@astrale-domains/services 0.5.0 → 0.6.0
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 +149 -51
- package/dist/scaffold/create-service.mjs +94 -0
- package/dist/scaffold/template/.env.example +4 -0
- package/dist/scaffold/template/README.md +75 -0
- package/dist/scaffold/template/gitignore +6 -0
- package/dist/scaffold/template/scripts/build.mjs +20 -0
- package/dist/scaffold/template/scripts/deploy.mjs +65 -0
- package/dist/scaffold/template/scripts/service.mjs +69 -0
- package/dist/scaffold/template/src/account.js +31 -0
- package/dist/scaffold/template/src/index.js +50 -0
- package/dist/scaffold/template/src/job.js +22 -0
- package/dist/schema/index.d.ts +2 -2
- package/dist/schema/index.js +1 -1
- package/dist/schema/modules/deployment/classes/cloudflare-deployment.d.ts +41 -20
- package/dist/schema/modules/deployment/classes/deployment.d.ts +54 -25
- package/dist/schema/modules/deployment/classes/deployment.js +20 -9
- package/dist/schema/modules/deployment/functions/retire-deployment.d.ts +5 -5
- package/dist/schema/modules/deployment/index.d.ts +2 -2
- package/dist/schema/modules/deployment/index.js +1 -1
- package/dist/schema/modules/deployment/types/deployment-hosting.d.ts +19 -49
- package/dist/schema/modules/deployment/types/deployment-hosting.js +10 -10
- package/dist/schema/modules/deployment/types/deployment-request.d.ts +45 -93
- package/dist/schema/modules/deployment/types/deployment-request.js +60 -30
- package/dist/schema/modules/deployment/types/deployment-response.d.ts +14 -22
- package/dist/schema/modules/deployment/types/deployment-response.js +5 -2
- package/dist/schema/modules/deployment/types/deployment-secret.d.ts +2 -2
- package/dist/schema/modules/deployment/types/deployment-secret.js +2 -2
- package/dist/schema/modules/deployment/types/deployment-summary.d.ts +13 -112
- package/dist/schema/modules/deployment/types/deployment-summary.js +16 -18
- package/dist/schema/modules/deployment/types/index.d.ts +10 -12
- package/dist/schema/modules/deployment/types/index.js +5 -6
- package/dist/schema/modules/deployment/types/{frozen-configuration.d.ts → legacy-deployment.d.ts} +24 -11
- package/dist/schema/modules/deployment/types/{frozen-configuration.js → legacy-deployment.js} +34 -10
- package/dist/schema/modules/deployment/types/legacy-migration.d.ts +17 -0
- package/dist/schema/modules/deployment/types/legacy-migration.js +17 -0
- package/dist/schema/modules/deployment/types/worker-configuration.d.ts +21 -0
- package/dist/schema/modules/deployment/types/worker-configuration.js +21 -0
- package/dist/schema/modules/deployment/types/worker-record.d.ts +12 -0
- package/dist/schema/modules/deployment/types/worker-record.js +15 -0
- package/dist/schema/modules/service/classes/cloudflare-service.d.ts +72 -135
- package/dist/schema/modules/service/classes/cloudflare-service.js +6 -1
- package/dist/schema/modules/service/classes/service.d.ts +17 -7
- package/dist/schema/modules/service/classes/service.js +14 -8
- package/dist/schema/modules/service/functions/deploy-service.d.ts +44 -100
- package/dist/schema/modules/service/functions/deploy-service.js +6 -5
- package/dist/schema/modules/service/functions/describe-hosting.d.ts +0 -1
- package/dist/schema/modules/service/functions/index.d.ts +1 -0
- package/dist/schema/modules/service/functions/index.js +1 -0
- package/dist/schema/modules/service/functions/list-service-deployments.d.ts +12 -36
- package/dist/schema/modules/service/functions/migrate-legacy-deployments.d.ts +17 -0
- package/dist/schema/modules/service/functions/migrate-legacy-deployments.js +15 -0
- package/dist/schema/modules/service/functions/promote-service.d.ts +2 -2
- package/dist/schema/modules/service/functions/set-service-secret.d.ts +2 -2
- package/dist/schema/modules/service/functions/transfer-service.d.ts +2 -2
- package/dist/schema/modules/service/index.d.ts +1 -1
- package/dist/schema/modules/service/index.js +1 -1
- package/dist/schema/schema.d.ts +158 -177
- package/package.json +11 -7
- package/dist/schema/modules/deployment/types/content/index.d.ts +0 -1
- package/dist/schema/modules/deployment/types/content/index.js +0 -1
- package/dist/schema/modules/deployment/types/content/limits.d.ts +0 -7
- package/dist/schema/modules/deployment/types/content/limits.js +0 -7
- package/dist/schema/modules/deployment/types/deployment-record.d.ts +0 -35
- package/dist/schema/modules/deployment/types/deployment-record.js +0 -31
- package/dist/schema/modules/deployment/types/service-deployment-artifact-module.d.ts +0 -26
- package/dist/schema/modules/deployment/types/service-deployment-artifact-module.js +0 -10
- package/dist/schema/modules/deployment/types/service-deployment-assets.d.ts +0 -49
- package/dist/schema/modules/deployment/types/service-deployment-assets.js +0 -16
- package/dist/schema/modules/deployment/types/service-deployment-content.d.ts +0 -19
- package/dist/schema/modules/deployment/types/service-deployment-content.js +0 -24
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { encodedContent, MAX_MODULE_BASE64_SIZE } from './service-deployment-content.js';
|
|
3
|
-
const fields = {
|
|
4
|
-
name: z.string().min(1).max(256),
|
|
5
|
-
kind: z.enum(['esm', 'wasm', 'text', 'data']).optional(),
|
|
6
|
-
};
|
|
7
|
-
export const artifactModule = z.strictObject({
|
|
8
|
-
...fields,
|
|
9
|
-
content: encodedContent(MAX_MODULE_BASE64_SIZE),
|
|
10
|
-
});
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const assetFile: z.ZodObject<{
|
|
3
|
-
path: z.ZodString;
|
|
4
|
-
contentType: z.ZodOptional<z.ZodString>;
|
|
5
|
-
content: z.ZodUnion<readonly [z.ZodObject<{
|
|
6
|
-
encoding: z.ZodEnum<{
|
|
7
|
-
gzip: "gzip";
|
|
8
|
-
identity: "identity";
|
|
9
|
-
}>;
|
|
10
|
-
decodedSize: z.ZodNumber;
|
|
11
|
-
contentBase64: z.ZodString;
|
|
12
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
13
|
-
encoding: z.ZodEnum<{
|
|
14
|
-
gzip: "gzip";
|
|
15
|
-
identity: "identity";
|
|
16
|
-
}>;
|
|
17
|
-
decodedSize: z.ZodNumber;
|
|
18
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
19
|
-
}, z.core.$strict>]>;
|
|
20
|
-
}, z.core.$strict>;
|
|
21
|
-
export declare const assetBundle: z.ZodObject<{
|
|
22
|
-
files: z.ZodArray<z.ZodObject<{
|
|
23
|
-
path: z.ZodString;
|
|
24
|
-
contentType: z.ZodOptional<z.ZodString>;
|
|
25
|
-
content: z.ZodUnion<readonly [z.ZodObject<{
|
|
26
|
-
encoding: z.ZodEnum<{
|
|
27
|
-
gzip: "gzip";
|
|
28
|
-
identity: "identity";
|
|
29
|
-
}>;
|
|
30
|
-
decodedSize: z.ZodNumber;
|
|
31
|
-
contentBase64: z.ZodString;
|
|
32
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
33
|
-
encoding: z.ZodEnum<{
|
|
34
|
-
gzip: "gzip";
|
|
35
|
-
identity: "identity";
|
|
36
|
-
}>;
|
|
37
|
-
decodedSize: z.ZodNumber;
|
|
38
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
39
|
-
}, z.core.$strict>]>;
|
|
40
|
-
}, z.core.$strict>>;
|
|
41
|
-
notFound: z.ZodOptional<z.ZodEnum<{
|
|
42
|
-
"404-page": "404-page";
|
|
43
|
-
none: "none";
|
|
44
|
-
"single-page-application": "single-page-application";
|
|
45
|
-
}>>;
|
|
46
|
-
runWorkerFirst: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
-
htmlHandling: z.ZodOptional<z.ZodLiteral<"none">>;
|
|
48
|
-
}, z.core.$strict>;
|
|
49
|
-
export type AssetBundle = z.infer<typeof assetBundle>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { encodedContent, MAX_ASSET_BASE64_SIZE } from './service-deployment-content.js';
|
|
3
|
-
const fields = {
|
|
4
|
-
path: z.string().min(1).max(2_048),
|
|
5
|
-
contentType: z.string().min(1).max(256).optional(),
|
|
6
|
-
};
|
|
7
|
-
export const assetFile = z.strictObject({
|
|
8
|
-
...fields,
|
|
9
|
-
content: encodedContent(MAX_ASSET_BASE64_SIZE),
|
|
10
|
-
});
|
|
11
|
-
export const assetBundle = z.strictObject({
|
|
12
|
-
files: z.array(assetFile).min(1).max(2_000),
|
|
13
|
-
notFound: z.enum(['none', '404-page', 'single-page-application']).optional(),
|
|
14
|
-
runWorkerFirst: z.boolean().optional(),
|
|
15
|
-
htmlHandling: z.literal('none').optional(),
|
|
16
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export { PORTABLE_BASE64_CHUNK_SIZE, MAX_MODULE_BASE64_SIZE, MAX_ASSET_BASE64_SIZE, MAX_MODULE_DECODED_SIZE, MAX_ASSET_DECODED_SIZE, MAX_DEPLOYMENT_DECODED_SIZE, } from './content/index.js';
|
|
3
|
-
/** Encoding is transport evidence; release identity always describes decoded bytes. */
|
|
4
|
-
export declare function encodedContent(maximumSize: number): z.ZodUnion<readonly [z.ZodObject<{
|
|
5
|
-
encoding: z.ZodEnum<{
|
|
6
|
-
gzip: "gzip";
|
|
7
|
-
identity: "identity";
|
|
8
|
-
}>;
|
|
9
|
-
decodedSize: z.ZodNumber;
|
|
10
|
-
contentBase64: z.ZodString;
|
|
11
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
12
|
-
encoding: z.ZodEnum<{
|
|
13
|
-
gzip: "gzip";
|
|
14
|
-
identity: "identity";
|
|
15
|
-
}>;
|
|
16
|
-
decodedSize: z.ZodNumber;
|
|
17
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
18
|
-
}, z.core.$strict>]>;
|
|
19
|
-
export type ServiceDeploymentContent = z.infer<ReturnType<typeof encodedContent>>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { PORTABLE_BASE64_CHUNK_SIZE } from './content/index.js';
|
|
3
|
-
export { PORTABLE_BASE64_CHUNK_SIZE, MAX_MODULE_BASE64_SIZE, MAX_ASSET_BASE64_SIZE, MAX_MODULE_DECODED_SIZE, MAX_ASSET_DECODED_SIZE, MAX_DEPLOYMENT_DECODED_SIZE, } from './content/index.js';
|
|
4
|
-
/** Encoding is transport evidence; release identity always describes decoded bytes. */
|
|
5
|
-
export function encodedContent(maximumSize) {
|
|
6
|
-
const fields = {
|
|
7
|
-
encoding: z.enum(['identity', 'gzip']),
|
|
8
|
-
decodedSize: z
|
|
9
|
-
.number()
|
|
10
|
-
.int()
|
|
11
|
-
.min(0)
|
|
12
|
-
.max((maximumSize / 4) * 3),
|
|
13
|
-
};
|
|
14
|
-
return z.union([
|
|
15
|
-
z.strictObject({ ...fields, contentBase64: z.string().max(maximumSize) }),
|
|
16
|
-
z.strictObject({
|
|
17
|
-
...fields,
|
|
18
|
-
contentBase64Chunks: z
|
|
19
|
-
.array(z.string().min(1).max(PORTABLE_BASE64_CHUNK_SIZE))
|
|
20
|
-
.min(1)
|
|
21
|
-
.max(Math.ceil(maximumSize / PORTABLE_BASE64_CHUNK_SIZE)),
|
|
22
|
-
}),
|
|
23
|
-
]);
|
|
24
|
-
}
|