alchemy 0.2.0 → 0.2.1
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 +506 -0
- package/lib/alchemy.js +10 -2
- package/lib/apply.js +86 -77
- package/lib/cloudflare/index.d.ts +2 -0
- package/lib/cloudflare/index.js +2 -0
- package/lib/cloudflare/static-site.js +9 -9
- package/lib/cloudflare/worker.js +1 -1
- package/lib/cloudflare/wrangler.json.d.ts +243 -0
- package/lib/cloudflare/wrangler.json.js +35 -0
- package/lib/cloudflare/zone-settings.d.ts +301 -0
- package/lib/cloudflare/zone-settings.js +1 -0
- package/lib/cloudflare/zone.d.ts +196 -0
- package/lib/cloudflare/zone.js +175 -0
- package/lib/destroy.js +1 -1
- package/lib/project/index.d.ts +1 -0
- package/lib/project/index.js +1 -0
- package/lib/project/vite.d.ts +39 -0
- package/lib/project/vite.js +68 -0
- package/lib/scope.d.ts +2 -0
- package/lib/scope.js +20 -1
- package/lib/state.js +6 -1
- package/lib/util/rm.d.ts +1 -0
- package/lib/util/rm.js +11 -0
- package/package.json +3 -2
- package/src/alchemy.ts +9 -2
- package/src/apply.ts +100 -94
- package/src/cloudflare/index.ts +2 -0
- package/src/cloudflare/static-site.ts +11 -11
- package/src/cloudflare/worker.ts +1 -1
- package/src/cloudflare/wrangler.json.ts +309 -0
- package/src/cloudflare/zone-settings.ts +368 -0
- package/src/cloudflare/zone.ts +491 -0
- package/src/destroy.ts +1 -1
- package/src/project/index.ts +1 -0
- package/src/project/vite.ts +152 -0
- package/src/scope.ts +25 -1
- package/src/state.ts +9 -1
- package/src/util/rm.ts +11 -0
package/src/state.ts
CHANGED
|
@@ -89,7 +89,15 @@ export class FileSystemStateStore implements StateStore {
|
|
|
89
89
|
await this.getPath(key),
|
|
90
90
|
"utf8",
|
|
91
91
|
);
|
|
92
|
-
|
|
92
|
+
const state = (await deserialize(
|
|
93
|
+
this.scope,
|
|
94
|
+
JSON.parse(content),
|
|
95
|
+
)) as State;
|
|
96
|
+
if (state.output === undefined) {
|
|
97
|
+
state.output = {} as any;
|
|
98
|
+
}
|
|
99
|
+
state.output.Scope = this.scope;
|
|
100
|
+
return state;
|
|
93
101
|
} catch (error: any) {
|
|
94
102
|
if (error.code === "ENOENT") {
|
|
95
103
|
return undefined;
|