CloudflareSourceUtils class

Utilities for editing Cloudflare Worker entrypoints such as cloudflare/src/edge.ts.

cloudflare/src/edge.tsなどのCloudflare Workerエントリファイルを編集するためのユーティリティ。

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

containsFunctionCall(String source, String functionName) → bool
Returns true if source contains a call to functionName.
ensureImport(String source, {required String alias, required String package}) → String
Ensure the import statement of package with alias exists in source.
ensureNamedImport(String source, {required String name, required String from}) → String
Ensure a named import of name from from exists in source.
functionArguments(String source, String functionName) → String?
既存の関数呼び出しの引数を取得し、認可などの設定を保持する。
insertDeployFunctions(String source, List<String> functions) → String?
Insert functions into the m.deploy([...]) array in source.
replaceFunctionCall(String source, String functionName, String replacement) → String
Replace all calls to functionName in source with replacement.
validateFirebaseProjectId(String source, String projectId, {String path = cloudflareEdgeEntryPath}) → void
Rejects a Worker entrypoint pinned to a different Firebase project.