@snorreks/firestack 0.0.1 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -29
- package/lib/commands/build.d.ts +3 -0
- package/lib/commands/build.d.ts.map +1 -0
- package/lib/commands/delete/utils/delete_functions.d.ts +3 -0
- package/lib/commands/delete/utils/delete_functions.d.ts.map +1 -0
- package/lib/commands/delete/utils/read_functions.d.ts +5 -0
- package/lib/commands/delete/utils/read_functions.d.ts.map +1 -0
- package/lib/commands/delete.d.ts +3 -0
- package/lib/commands/delete.d.ts.map +1 -0
- package/lib/commands/deploy/index.d.ts +3 -0
- package/lib/commands/deploy/index.d.ts.map +1 -0
- package/lib/commands/deploy/utils/create_deploy_index.d.ts +9 -0
- package/lib/commands/deploy/utils/create_deploy_index.d.ts.map +1 -0
- package/lib/commands/deploy/utils/environment.d.ts +2 -0
- package/lib/commands/deploy/utils/environment.d.ts.map +1 -0
- package/lib/commands/deploy/utils/find_functions.d.ts +2 -0
- package/lib/commands/deploy/utils/find_functions.d.ts.map +1 -0
- package/lib/commands/deploy/utils/options.d.ts +30 -0
- package/lib/commands/deploy/utils/options.d.ts.map +1 -0
- package/lib/commands/deploy/utils/process_function.d.ts +6 -0
- package/lib/commands/deploy/utils/process_function.d.ts.map +1 -0
- package/lib/commands/deploy/utils/retry_failed_functions.d.ts +16 -0
- package/lib/commands/deploy/utils/retry_failed_functions.d.ts.map +1 -0
- package/lib/commands/emulate.d.ts +3 -0
- package/lib/commands/emulate.d.ts.map +1 -0
- package/lib/commands/logs.d.ts +3 -0
- package/lib/commands/logs.d.ts.map +1 -0
- package/lib/commands/rules/utils/rule_files.d.ts +9 -0
- package/lib/commands/rules/utils/rule_files.d.ts.map +1 -0
- package/lib/commands/rules.d.ts +3 -0
- package/lib/commands/rules.d.ts.map +1 -0
- package/lib/commands/scripts.d.ts +3 -0
- package/lib/commands/scripts.d.ts.map +1 -0
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/index.d.ts.map +1 -1
- package/lib/constants/options.d.ts +2 -0
- package/lib/constants/options.d.ts.map +1 -0
- package/lib/helpers/auth.d.ts +1 -1
- package/lib/helpers/auth.d.ts.map +1 -1
- package/lib/helpers/database.d.ts +1 -1
- package/lib/helpers/database.d.ts.map +1 -1
- package/lib/helpers/firestore.d.ts +1 -1
- package/lib/helpers/firestore.d.ts.map +1 -1
- package/lib/helpers/https.d.ts +8 -14
- package/lib/helpers/https.d.ts.map +1 -1
- package/lib/helpers/scheduler.d.ts +1 -1
- package/lib/helpers/scheduler.d.ts.map +1 -1
- package/lib/helpers/storage.d.ts +1 -1
- package/lib/helpers/storage.d.ts.map +1 -1
- package/lib/types/core.d.ts +1 -1
- package/lib/types/function-types.d.ts +1 -1
- package/lib/types/function-types.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/utils/build_utils.d.ts +20 -0
- package/lib/utils/build_utils.d.ts.map +1 -0
- package/lib/utils/checksum.d.ts +8 -0
- package/lib/utils/checksum.d.ts.map +1 -0
- package/lib/utils/common.d.ts +2 -0
- package/lib/utils/common.d.ts.map +1 -0
- package/lib/utils/create-deploy-index.d.ts +9 -0
- package/lib/utils/create-deploy-index.d.ts.map +1 -0
- package/lib/utils/env.d.ts +2 -0
- package/lib/utils/env.d.ts.map +1 -0
- package/lib/utils/firebase_utils.d.ts +5 -0
- package/lib/utils/firebase_utils.d.ts.map +1 -0
- package/lib/utils/function_naming.d.ts +38 -0
- package/lib/utils/function_naming.d.ts.map +1 -0
- package/lib/utils/logger.d.ts +30 -0
- package/lib/utils/logger.d.ts.map +1 -0
- package/lib/utils/node-shim.d.ts +71 -0
- package/lib/utils/node-shim.d.ts.map +1 -0
- package/lib/utils/read-compiled-file.d.ts +2 -0
- package/lib/utils/read-compiled-file.d.ts.map +1 -0
- package/lib/utils/run-functions.d.ts +12 -0
- package/lib/utils/run-functions.d.ts.map +1 -0
- package/main.d.ts +2 -0
- package/main.d.ts.map +1 -0
- package/main.js +122 -86
- package/package.json +24 -2
package/README.md
CHANGED
|
@@ -49,13 +49,16 @@ Create a file in your functions directory (default: `src/controllers`):
|
|
|
49
49
|
|
|
50
50
|
```typescript
|
|
51
51
|
// src/controllers/api/hello.ts
|
|
52
|
-
import { onRequest } from
|
|
52
|
+
import { onRequest } from "@snorreks/firestack";
|
|
53
53
|
|
|
54
|
-
export default onRequest(
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
export default onRequest(
|
|
55
|
+
(req, res) => {
|
|
56
|
+
res.send({ message: "Hello from Firestack!" });
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
region: "europe-west1",
|
|
60
|
+
},
|
|
61
|
+
);
|
|
59
62
|
```
|
|
60
63
|
|
|
61
64
|
### 3. Deploy
|
|
@@ -66,15 +69,15 @@ firestack deploy --flavor development
|
|
|
66
69
|
|
|
67
70
|
## Commands
|
|
68
71
|
|
|
69
|
-
| Command
|
|
70
|
-
|
|
71
|
-
| `firestack build`
|
|
72
|
-
| `firestack deploy`
|
|
73
|
-
| `firestack delete`
|
|
72
|
+
| Command | Description |
|
|
73
|
+
| ------------------- | --------------------------------------- |
|
|
74
|
+
| `firestack build` | Build functions for local development |
|
|
75
|
+
| `firestack deploy` | Build and deploy functions to Firebase |
|
|
76
|
+
| `firestack delete` | Delete unused functions |
|
|
74
77
|
| `firestack emulate` | Run Firebase emulators with live reload |
|
|
75
|
-
| `firestack rules`
|
|
76
|
-
| `firestack scripts` | Run scripts from the scripts directory
|
|
77
|
-
| `firestack logs`
|
|
78
|
+
| `firestack rules` | Deploy Firestore and Storage rules |
|
|
79
|
+
| `firestack scripts` | Run scripts from the scripts directory |
|
|
80
|
+
| `firestack logs` | View function logs |
|
|
78
81
|
|
|
79
82
|
## Folder Structure
|
|
80
83
|
|
|
@@ -85,11 +88,11 @@ src/
|
|
|
85
88
|
│ ├── firestore/ # Firestore triggers
|
|
86
89
|
│ ├── scheduler/ # Scheduled tasks
|
|
87
90
|
│ └── auth/ # Auth triggers
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
└── rules/ # Firestore & Storage rules
|
|
92
|
+
├── firestore.rules
|
|
93
|
+
├── firestore.indexes.json
|
|
94
|
+
└── storage.rules
|
|
95
|
+
scripts/ # Deployment scripts
|
|
93
96
|
└── init.ts # Emulator init script
|
|
94
97
|
```
|
|
95
98
|
|
|
@@ -97,16 +100,16 @@ src/
|
|
|
97
100
|
|
|
98
101
|
### firestack.json Options
|
|
99
102
|
|
|
100
|
-
| Option
|
|
101
|
-
|
|
102
|
-
| `flavors`
|
|
103
|
-
| `region`
|
|
104
|
-
| `functionsDirectory` | string
|
|
105
|
-
| `rulesDirectory`
|
|
106
|
-
| `scriptsDirectory`
|
|
107
|
-
| `initScript`
|
|
108
|
-
| `nodeVersion`
|
|
109
|
-
| `minify`
|
|
103
|
+
| Option | Type | Default | Description |
|
|
104
|
+
| -------------------- | ------- | ----------------- | ---------------------------------- |
|
|
105
|
+
| `flavors` | object | `{}` | Map of flavor names to project IDs |
|
|
106
|
+
| `region` | string | `us-central1` | Default region for functions |
|
|
107
|
+
| `functionsDirectory` | string | `src/controllers` | Where functions are located |
|
|
108
|
+
| `rulesDirectory` | string | `src/rules` | Where rules files are located |
|
|
109
|
+
| `scriptsDirectory` | string | `scripts` | Where scripts are located |
|
|
110
|
+
| `initScript` | string | `init.ts` | Script to run before emulator |
|
|
111
|
+
| `nodeVersion` | string | `20` | Node.js runtime version |
|
|
112
|
+
| `minify` | boolean | `true` | Minify bundled functions |
|
|
110
113
|
|
|
111
114
|
### Common CLI Options
|
|
112
115
|
|
|
@@ -118,11 +121,13 @@ src/
|
|
|
118
121
|
## Emulator
|
|
119
122
|
|
|
120
123
|
Run emulators with:
|
|
124
|
+
|
|
121
125
|
```bash
|
|
122
126
|
firestack emulate
|
|
123
127
|
```
|
|
124
128
|
|
|
125
129
|
The emulator will:
|
|
130
|
+
|
|
126
131
|
1. Run your init script (if exists) to populate Firestore
|
|
127
132
|
2. Build all functions
|
|
128
133
|
3. Start Firebase emulators with live reload
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/lib/commands/build.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoCpC,eAAO,MAAM,YAAY,SAkDrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete_functions.d.ts","sourceRoot":"","sources":["../../../../../src/lib/commands/delete/utils/delete_functions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAIvE,wBAAsB,eAAe,CACnC,OAAO,EAAE,aAAa,EACtB,aAAa,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DeployOptions } from '$commands/deploy/utils/options.js';
|
|
2
|
+
export declare function getLocalFunctionNames(options: DeployOptions): Promise<string[]>;
|
|
3
|
+
export declare function getOnlineFunctionNames(options: DeployOptions): Promise<string[]>;
|
|
4
|
+
export declare function getUnusedFunctionNames(options: DeployOptions): Promise<string[]>;
|
|
5
|
+
//# sourceMappingURL=read_functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read_functions.d.ts","sourceRoot":"","sources":["../../../../../src/lib/commands/delete/utils/read_functions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGvE,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAarF;AAED,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CActF;AAED,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAetF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/lib/commands/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,aAAa,SAiCtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/commands/deploy/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC,eAAO,MAAM,aAAa,SA6EtB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface BuildFunctionData {
|
|
2
|
+
functionName: string;
|
|
3
|
+
funcPath: string;
|
|
4
|
+
temporaryDirectory: string;
|
|
5
|
+
controllersPath: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function createTemporaryIndexFunctionFile(buildFunctionData: BuildFunctionData): Promise<string>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=create_deploy_index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_deploy_index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/commands/deploy/utils/create_deploy_index.ts"],"names":[],"mappings":"AAqBA,UAAU,iBAAiB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAsB,gCAAgC,CACpD,iBAAiB,EAAE,iBAAiB,GACnC,OAAO,CAAC,MAAM,CAAC,CAiBjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../../../src/lib/commands/deploy/utils/environment.ts"],"names":[],"mappings":"AAGA,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAsBpF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find_functions.d.ts","sourceRoot":"","sources":["../../../../../src/lib/commands/deploy/utils/find_functions.ts"],"names":[],"mappings":"AAGA,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA2BlE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface DeployOptions {
|
|
2
|
+
flavor: string;
|
|
3
|
+
dryRun?: boolean;
|
|
4
|
+
force?: boolean;
|
|
5
|
+
verbose?: boolean;
|
|
6
|
+
only?: string;
|
|
7
|
+
region?: string;
|
|
8
|
+
concurrency?: number;
|
|
9
|
+
retryAmount?: number;
|
|
10
|
+
minify?: boolean;
|
|
11
|
+
sourcemap?: boolean;
|
|
12
|
+
functionsDirectory?: string;
|
|
13
|
+
rulesDirectory?: string;
|
|
14
|
+
scriptsDirectory?: string;
|
|
15
|
+
initScript?: string;
|
|
16
|
+
projectId?: string;
|
|
17
|
+
nodeVersion?: string;
|
|
18
|
+
debug?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface FirestackConfig {
|
|
21
|
+
functionsDirectory?: string;
|
|
22
|
+
rulesDirectory?: string;
|
|
23
|
+
scriptsDirectory?: string;
|
|
24
|
+
initScript?: string;
|
|
25
|
+
flavors?: Record<string, string>;
|
|
26
|
+
region?: string;
|
|
27
|
+
nodeVersion?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function getOptions(cliOptions: DeployOptions): Promise<DeployOptions>;
|
|
30
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../src/lib/commands/deploy/utils/options.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,UAAU,CAAC,UAAU,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAkClF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DeployOptions } from './options.js';
|
|
2
|
+
export declare function processFunction(funcPath: string, options: DeployOptions, environment: Record<string, string>, controllersPath: string): Promise<{
|
|
3
|
+
functionName: string;
|
|
4
|
+
status: string;
|
|
5
|
+
}>;
|
|
6
|
+
//# sourceMappingURL=process_function.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process_function.d.ts","sourceRoot":"","sources":["../../../../../src/lib/commands/deploy/utils/process_function.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,eAAe,EAAE,MAAM;;;GAuIxB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DeployOptions } from './options.js';
|
|
2
|
+
/**
|
|
3
|
+
* Retries failed function deployments.
|
|
4
|
+
* @param failedFunctions The functions that failed to deploy.
|
|
5
|
+
* @param functionFiles The list of all function files.
|
|
6
|
+
* @param options The deployment options.
|
|
7
|
+
* @param environment The environment variables.
|
|
8
|
+
*/
|
|
9
|
+
export declare function retryFailedFunctions(failedFunctions: {
|
|
10
|
+
functionName: string;
|
|
11
|
+
status: string;
|
|
12
|
+
}[], functionFiles: string[], options: DeployOptions, environment: Record<string, string>, controllersPath: string): Promise<{
|
|
13
|
+
functionName: string;
|
|
14
|
+
status: string;
|
|
15
|
+
}[]>;
|
|
16
|
+
//# sourceMappingURL=retry_failed_functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry_failed_functions.d.ts","sourceRoot":"","sources":["../../../../../src/lib/commands/deploy/utils/retry_failed_functions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,eAAe,EAAE;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,EAC3D,aAAa,EAAE,MAAM,EAAE,EACvB,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,eAAe,EAAE,MAAM;kBAJU,MAAM;YAAU,MAAM;KAmCxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emulate.d.ts","sourceRoot":"","sources":["../../../src/lib/commands/emulate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8LpC,eAAO,MAAM,cAAc,SA0FvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/lib/commands/logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,eAAO,MAAM,WAAW,SA2CpB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DeployOptions } from '$commands/deploy/utils/options.js';
|
|
2
|
+
export interface RuleFile {
|
|
3
|
+
name: string;
|
|
4
|
+
type: 'firestore' | 'storage' | 'firestoreIndexes';
|
|
5
|
+
path: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function findRuleFiles(rulesDirectory: string): Promise<RuleFile[]>;
|
|
8
|
+
export declare function getRulesToDeploy(options: DeployOptions): Promise<RuleFile[]>;
|
|
9
|
+
//# sourceMappingURL=rule_files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule_files.d.ts","sourceRoot":"","sources":["../../../../../src/lib/commands/rules/utils/rule_files.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAIvE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,GAAG,SAAS,GAAG,kBAAkB,CAAC;IACnD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAsB,aAAa,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAmC/E;AAED,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAUlF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../src/lib/commands/rules.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,YAAY,SA+FrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../../../src/lib/commands/scripts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiGpC,eAAO,MAAM,cAAc,SA0CvB,CAAC"}
|
package/lib/constants/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/lib/constants/options.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,OAAO,CAAC"}
|
package/lib/helpers/auth.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EventContext } from 'firebase-functions/v1';
|
|
2
2
|
import type { UserRecord } from 'firebase-functions/v1/auth';
|
|
3
3
|
import type { AuthUserRecord } from 'firebase-functions/v2/identity';
|
|
4
|
-
import type { AuthEventContext, AuthTriggerOptions, BeforeCreateResponse, BeforeSignInResponse } from '
|
|
4
|
+
import type { AuthEventContext, AuthTriggerOptions, BeforeCreateResponse, BeforeSignInResponse } from '$types';
|
|
5
5
|
/**
|
|
6
6
|
* Responds to the creation of a Firebase Auth user.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,QAAQ,CAAC;AAEhB;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GACvB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,EACpF,WAAW,kBAAkB,YADb,UAAU,WAAW,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAEnE,CAAC;AACb;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GACvB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,EACpF,WAAW,kBAAkB,YADb,UAAU,WAAW,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAEnE,CAAC;AACb;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,CACP,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,gBAAgB,KACtB,oBAAoB,GAAG,IAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,EAChF,WAAW,kBAAkB,YAHrB,cAAc,WACX,gBAAgB,KACtB,oBAAoB,GAAG,IAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,IAAI,CAErE,CAAC;AACb;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,CACP,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,gBAAgB,KACtB,oBAAoB,GAAG,IAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,EAChF,WAAW,kBAAkB,YAHrB,cAAc,WACX,gBAAgB,KACtB,oBAAoB,GAAG,IAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,IAAI,CAErE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Change, ParamsOf } from 'firebase-functions/v2/core';
|
|
2
2
|
import type { DatabaseEvent, DataSnapshot } from 'firebase-functions/v2/database';
|
|
3
|
-
import type { ReferenceOptions } from '
|
|
3
|
+
import type { ReferenceOptions } from '$types';
|
|
4
4
|
/**
|
|
5
5
|
* Event handler that fires every time new data is created in Firebase Realtime
|
|
6
6
|
* Database.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC/C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,GAAG,SAAS,MAAM,GAAG,MAAM,EACxD,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,EAC9F,UAAU,gBAAgB,aADT,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAE7E,CAAC;AAEb;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,GAAG,SAAS,MAAM,GAAG,MAAM,EACxD,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,EAC9F,UAAU,gBAAgB,aADT,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAE7E,CAAC;AAEb;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,GAAG,SAAS,MAAM,GAAG,MAAM,EACxD,SAAS,CACP,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,KACtD,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,EACnC,UAAU,gBAAgB,aAFjB,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,KACtD,WAAW,CAAC,OAAO,CAAC,GAAG,OAElB,CAAC;AAEb;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,GAAG,SAAS,MAAM,GAAG,MAAM,EACxD,SAAS,CACP,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,KACtD,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,EACnC,UAAU,gBAAgB,aAFjB,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,KACtD,WAAW,CAAC,OAAO,CAAC,GAAG,OAElB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ParamsOf } from 'firebase-functions/v2/core';
|
|
2
2
|
import type { Change, DocumentSnapshot, FirestoreEvent, QueryDocumentSnapshot } from 'firebase-functions/v2/firestore';
|
|
3
|
-
import type { CoreData, DocumentOptions } from '
|
|
3
|
+
import type { CoreData, DocumentOptions } from '$types';
|
|
4
4
|
/** Respond only to document creations. */
|
|
5
5
|
export declare const onDocumentCreated: <Document extends string = string>(handler: (event: FirestoreEvent<QueryDocumentSnapshot | undefined, ParamsOf<Document>>) => PromiseLike<unknown> | unknown, _options?: DocumentOptions) => (event: FirestoreEvent<QueryDocumentSnapshot | undefined, ParamsOf<Document>>) => PromiseLike<unknown> | unknown;
|
|
6
6
|
/** Respond only to document deletions. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firestore.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EACV,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"firestore.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/firestore.ts"],"names":[],"mappings":"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"}
|
package/lib/helpers/https.d.ts
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
import type { Buffer } from 'node:buffer';
|
|
2
2
|
import type { Response } from 'express';
|
|
3
3
|
import type { CallableRequest, Request } from 'firebase-functions/v2/https';
|
|
4
|
-
import type { CallableFunctions, HttpsOptions, RequestFunctions } from '
|
|
5
|
-
interface FirebaseRequest<T extends Record<string, string> = Record<string, string>,
|
|
4
|
+
import type { CallableFunctions, HttpsOptions, RequestFunctions } from '$types';
|
|
5
|
+
export interface FirebaseRequest<T extends Record<string, string> = Record<string, string>, _ResBody = unknown, ReqBody = unknown> extends Request {
|
|
6
6
|
/** The wire format representation of the request body. */
|
|
7
7
|
rawBody: Buffer;
|
|
8
8
|
body: ReqBody;
|
|
9
9
|
params: T;
|
|
10
10
|
}
|
|
11
|
+
export type RequestHandler<AllFunctions extends RequestFunctions, FunctionName extends keyof AllFunctions, Params extends Record<string, string> = Record<string, string>> = (request: FirebaseRequest<Params, AllFunctions[FunctionName][1], AllFunctions[FunctionName][0]>, response: Response<AllFunctions[FunctionName][1]>) => Promise<void> | void;
|
|
11
12
|
/**
|
|
12
13
|
* Handles HTTPS requests.
|
|
13
|
-
*
|
|
14
|
-
* @param handler - A function that takes a {@link https.Request} and response
|
|
15
|
-
* object, same signature as an Express app.
|
|
16
|
-
* @param _options - Options to set on this function
|
|
17
|
-
* @returns A function that you can export and deploy.
|
|
14
|
+
* ...
|
|
18
15
|
*/
|
|
19
|
-
export declare const onRequest: <AllFunctions extends RequestFunctions, FunctionName extends keyof AllFunctions, Params extends Record<string, string> = Record<string, string>>(handler:
|
|
16
|
+
export declare const onRequest: <AllFunctions extends RequestFunctions, FunctionName extends keyof AllFunctions, Params extends Record<string, string> = Record<string, string>>(handler: RequestHandler<AllFunctions, FunctionName, Params>, _options?: HttpsOptions<FunctionName>) => RequestHandler<AllFunctions, FunctionName, Params>;
|
|
17
|
+
export type CallHandler<AllFunctions extends CallableFunctions, FunctionName extends keyof AllFunctions> = (request: CallableRequest<AllFunctions[FunctionName][0]>) => Promise<AllFunctions[FunctionName][1]> | AllFunctions[FunctionName][1];
|
|
20
18
|
/**
|
|
21
19
|
* Declares a callable method for clients to call using a Firebase SDK.
|
|
22
|
-
*
|
|
23
|
-
* @param handler - A function that takes a {@link https.CallableRequest}.
|
|
24
|
-
* @param _options - Options to set on this function.
|
|
25
|
-
* @returns A function that you can export and deploy.
|
|
20
|
+
* ...
|
|
26
21
|
*/
|
|
27
|
-
export declare const onCall: <AllFunctions extends CallableFunctions, FunctionName extends keyof AllFunctions>(handler:
|
|
28
|
-
export {};
|
|
22
|
+
export declare const onCall: <AllFunctions extends CallableFunctions, FunctionName extends keyof AllFunctions>(handler: CallHandler<AllFunctions, FunctionName>, _options?: HttpsOptions<FunctionName>) => CallHandler<AllFunctions, FunctionName>;
|
|
29
23
|
//# sourceMappingURL=https.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"https.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/https.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"https.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/https.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAEhF,MAAM,WAAW,eAAe,CAC9B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACzD,QAAQ,GAAG,OAAO,EAClB,OAAO,GAAG,OAAO,CACjB,SAAQ,OAAO;IACf,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,CAAC,CAAC;CACX;AAED,MAAM,MAAM,cAAc,CACxB,YAAY,SAAS,gBAAgB,EACrC,YAAY,SAAS,MAAM,YAAY,EACvC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAC5D,CACF,OAAO,EAAE,eAAe,CAAC,MAAM,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,EAC9F,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KAC9C,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE1B;;;GAGG;AACH,eAAO,MAAM,SAAS,GACpB,YAAY,SAAS,gBAAgB,EACrC,YAAY,SAAS,MAAM,YAAY,EACvC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAG9D,SAAS,cAAc,CAAC,YAAY,EAAE,YAAY,EAAE,MAAM,CAAC,EAC3D,WAAW,YAAY,CAAC,YAAY,CAAC,KACpC,cAAc,CAAC,YAAY,EAAE,YAAY,EAAE,MAAM,CAAY,CAAC;AAGjE,MAAM,MAAM,WAAW,CACrB,YAAY,SAAS,iBAAiB,EACtC,YAAY,SAAS,MAAM,YAAY,IACrC,CACF,OAAO,EAAE,eAAe,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KACpD,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,MAAM,GACjB,YAAY,SAAS,iBAAiB,EACtC,YAAY,SAAS,MAAM,YAAY,EAGvC,SAAS,WAAW,CAAC,YAAY,EAAE,YAAY,CAAC,EAChD,WAAW,YAAY,CAAC,YAAY,CAAC,KACpC,WAAW,CAAC,YAAY,EAAE,YAAY,CAAY,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { EventContext } from 'firebase-functions/v1';
|
|
2
|
-
import type { ScheduleOptions } from '
|
|
2
|
+
import type { ScheduleOptions } from '$types';
|
|
3
3
|
export declare const onSchedule: (handler: (context: EventContext) => PromiseLike<unknown> | unknown, _options: ScheduleOptions) => (context: EventContext) => PromiseLike<unknown> | unknown;
|
|
4
4
|
//# sourceMappingURL=scheduler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,eAAO,MAAM,UAAU,GACrB,SAAS,CAAC,OAAO,EAAE,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,EAClE,UAAU,eAAe,eADN,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAEjD,CAAC"}
|
package/lib/helpers/storage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StorageEvent } from 'firebase-functions/v2/storage';
|
|
2
|
-
import type { ObjectTriggerOptions } from '
|
|
2
|
+
import type { ObjectTriggerOptions } from '$types';
|
|
3
3
|
/**
|
|
4
4
|
* Event handler sent only when a bucket has enabled object versioning. This
|
|
5
5
|
* event indicates that the live version of an object has become an archived
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAEnD;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,CAAC,KAAK,EAAE,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,EAChE,WAAW,oBAAoB,aADd,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAE/C,CAAC;AACb;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAS,CAAC,KAAK,EAAE,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,EAChE,WAAW,oBAAoB,aADd,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAE/C,CAAC;AAEb;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,CAAC,KAAK,EAAE,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,EAChE,WAAW,oBAAoB,aADd,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAE/C,CAAC;AAEb;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,CAAC,KAAK,EAAE,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,EAChE,WAAW,oBAAoB,aADd,YAAY,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,OAE/C,CAAC"}
|
package/lib/types/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { databaseFunctions, deployDirectories, firestoreFunctions, functionBuilders, functions, httpsFunctions, schedulerFunctions, storageFunctions } from '
|
|
1
|
+
import type { databaseFunctions, deployDirectories, firestoreFunctions, functionBuilders, functions, httpsFunctions, schedulerFunctions, storageFunctions } from '$constants';
|
|
2
2
|
export type DatabaseFunction = (typeof databaseFunctions)[number];
|
|
3
3
|
export type FirestoreFunction = (typeof firestoreFunctions)[number];
|
|
4
4
|
export type StorageFunction = (typeof storageFunctions)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-types.d.ts","sourceRoot":"","sources":["../../../src/lib/types/function-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,
|
|
1
|
+
{"version":3,"file":"function-types.d.ts","sourceRoot":"","sources":["../../../src/lib/types/function-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/lib/types/index.d.ts
CHANGED
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { NodeVersion } from "$types";
|
|
2
|
+
interface BuildFunctionOptions {
|
|
3
|
+
inputFile: string;
|
|
4
|
+
outputFile: string;
|
|
5
|
+
configPath?: string;
|
|
6
|
+
minify?: boolean;
|
|
7
|
+
sourcemap?: boolean;
|
|
8
|
+
external?: string[];
|
|
9
|
+
sourceRoot?: string;
|
|
10
|
+
keepNames?: boolean;
|
|
11
|
+
footer?: string;
|
|
12
|
+
nodeVersion?: NodeVersion;
|
|
13
|
+
requireFix?: boolean;
|
|
14
|
+
tsconfig?: string;
|
|
15
|
+
__dirnameFix?: boolean;
|
|
16
|
+
__filenameFix?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function buildFunction(options: BuildFunctionOptions): Promise<void>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=build_utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build_utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/build_utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,UAAU,oBAAoB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAsB,aAAa,CAClC,OAAO,EAAE,oBAAoB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAwEf"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChecksumData } from '$types';
|
|
2
|
+
export declare const checksumsFolderPath: (options: {
|
|
3
|
+
outputDirectory: string;
|
|
4
|
+
flavor: string;
|
|
5
|
+
}) => string;
|
|
6
|
+
export declare const checkForChanges: (deployFunction: ChecksumData) => Promise<ChecksumData | undefined>;
|
|
7
|
+
export declare const cacheChecksumLocal: ({ outputDirectory, checksum, flavor, functionName, }: ChecksumData) => Promise<void>;
|
|
8
|
+
//# sourceMappingURL=checksum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checksum.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/checksum.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAM3C,eAAO,MAAM,mBAAmB,GAAI,SAAS;IAAE,eAAe,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KAAG,MACvB,CAAC;AAErE,eAAO,MAAM,eAAe,GAC1B,gBAAgB,YAAY,KAC3B,OAAO,CAAC,YAAY,GAAG,SAAS,CAgClC,CAAC;AA0BF,eAAO,MAAM,kBAAkB,GAAU,sDAKtC,YAAY,KAAG,OAAO,CAAC,IAAI,CAa7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/common.ts"],"names":[],"mappings":"AAGA,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAevD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a temporary index file for a function.
|
|
3
|
+
* @param inputFile The path to the function's source file.
|
|
4
|
+
* @param tempDir The temporary directory to create the file in.
|
|
5
|
+
* @param functionName The name of the function.
|
|
6
|
+
* @returns The path to the temporary index file.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createTemporaryIndexFunctionFile(inputFile: string, tempDir: string, functionName: string): Promise<string>;
|
|
9
|
+
//# sourceMappingURL=create-deploy-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-deploy-index.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/create-deploy-index.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAsB,gCAAgC,CACpD,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC,CAMjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/env.ts"],"names":[],"mappings":"AAIA,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAoC1F"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function createFirebaseConfig(nodeVersion: string): string;
|
|
2
|
+
export declare function createPackageJson(nodeVersion: string): string;
|
|
3
|
+
export declare function toDotEnvironmentCode(environment: Record<string, string>): string;
|
|
4
|
+
export declare function copyEnvFile(sourceDir: string, destDir: string): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=firebase_utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firebase_utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/firebase_utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAQhE;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAS7D;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAIhF;AAED,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBnF"}
|