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
sourcecontains a call tofunctionName. -
ensureImport(
String source, {required String alias, required String package}) → String -
Ensure the import statement of
packagewithaliasexists insource. -
ensureNamedImport(
String source, {required String name, required String from}) → String -
Ensure a named import of
namefromfromexists insource. -
functionArguments(
String source, String functionName) → String? - 既存の関数呼び出しの引数を取得し、認可などの設定を保持する。
-
insertDeployFunctions(
String source, List< String> functions) → String? -
Insert
functionsinto them.deploy([...])array insource. -
replaceFunctionCall(
String source, String functionName, String replacement) → String -
Replace all calls to
functionNameinsourcewithreplacement. -
validateFirebaseProjectId(
String source, String projectId, {String path = cloudflareEdgeEntryPath}) → void - Rejects a Worker entrypoint pinned to a different Firebase project.