@mp-lb/arcnet 0.5.10 → 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
CHANGED
|
@@ -13,7 +13,7 @@ A package-only project gets no deploy workflow or cloud configuration. Vercel si
|
|
|
13
13
|
|
|
14
14
|
The project file can contain `services` (Zap Arc service blocks), `vercel` (site roots and project identities), non-secret `variables`, and a `secrets` source/consumer map. For a Vercel site, `root: apps/<site>` selects its package. ArcNet infers a static build for Vite, VitePress, or prerendered React Router packages and uses Vercel's framework build for Next.js. Explicit `build`, `output`, and `outputConfig` override static detection. Set `vercel.dnsZone` and a site's `domain` to attach a custom domain and reconcile its Cloudflare CNAME on production deploy; the deploy consumer must provide `CLOUDFLARE_API_TOKEN`. Existing unrelated DNS records cause a clear error rather than being replaced. Container services default to `.arcnet/<service>.Dockerfile`. The package selects standard Cloud Run domains when omitted; set `domain` for exceptions. The `gce-worker` module is deferred until its startup mechanism is replaced.
|
|
15
15
|
|
|
16
|
-
When `aws-s3` is selected,
|
|
16
|
+
When `aws-s3` is selected, the conventional `s3` service gets a private `arcnet.<project>.backend` bucket by default. Other S3 services use `arcnet.<project>.<service>`; set `params.bucket` to override either name. ArcNet derives browser CORS origins from the HTTPS domains of selected services and Vercel sites. This permits browser requests made with backend-issued presigned URLs while the bucket remains private.
|
|
17
17
|
|
|
18
18
|
For a new Vercel site, set `mode: new`, `creationApproved: true`, and its `projectName`. The first approved push to `main` creates it if missing; subsequent deploys verify and reuse the named project. `mode: existing` still requires a committed project ID and never creates a project. `arcnet inspect` reports missing new projects without creating them.
|
|
19
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileArcnet.d.ts","sourceRoot":"","sources":["../src/compileArcnet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,UAAU,GAAI,QAAQ,YAAY,iDACoE,CAAC;AAEpH,eAAO,MAAM,aAAa,GAAI,QAAQ,YAAY,EAAE,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU/D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"compileArcnet.d.ts","sourceRoot":"","sources":["../src/compileArcnet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,UAAU,GAAI,QAAQ,YAAY,iDACoE,CAAC;AAEpH,eAAO,MAAM,aAAa,GAAI,QAAQ,YAAY,EAAE,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU/D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEpD,CAAC"}
|
package/dist/compileArcnet.js
CHANGED
|
@@ -21,6 +21,8 @@ export const compileTerraform = (config) => {
|
|
|
21
21
|
if (Object.values(services).some((service) => service.module === "gce-worker"))
|
|
22
22
|
throw new Error("GCE workers are deferred until the startup module is replaced.");
|
|
23
23
|
for (const [name, service] of Object.entries(services)) {
|
|
24
|
+
if (service.module === "aws-s3")
|
|
25
|
+
service.params.bucket ??= `arcnet.${config.project}.${name === "s3" ? "backend" : name}`;
|
|
24
26
|
if (["cloud-run-web", "gce-worker"].includes(service.module) &&
|
|
25
27
|
!service.dockerfile)
|
|
26
28
|
service.dockerfile = `.arcnet/${name}.Dockerfile`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileArcnet.js","sourceRoot":"","sources":["../src/compileArcnet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,kBAAkB,EAAE,MA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O,CAAC,MAAM,KAAK,eAAe;YACpC,OAAO,CAAC,MAAM,GAAG,sDAAsD,CAAC;IAE5E,MAAM,OAAO,GAAG;QACd,GAAG,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE;QAC9B,QAAQ,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,KAAK,CAAC,EAAE;QAC3D,EAAE,EAAE;YACF,MAAM,EAAE,WAAW;YACnB,YAAY,EAAE,CAAC,KAAK,CAAC;YACrB,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;SAC1C;QACD,GAAG,cAAc;KAClB,CAAC;IAEF,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;IAElE,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI;QAClC,wBAAwB,EAAE,EAAE;QAC5B,cAAc,EAAE,qBAAqB,MAAM,CAAC,OAAO,0BAA0B;KAC9E,CAAC;IAEF,OAAO;QACL,UAAU;QACV,OAAO;QACP,QAAQ;KACT,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -13,7 +13,7 @@ A package-only project gets no deploy workflow or cloud configuration. Vercel si
|
|
|
13
13
|
|
|
14
14
|
The project file can contain `services` (Zap Arc service blocks), `vercel` (site roots and project identities), non-secret `variables`, and a `secrets` source/consumer map. For a Vercel site, `root: apps/<site>` selects its package. ArcNet infers a static build for Vite, VitePress, or prerendered React Router packages and uses Vercel's framework build for Next.js. Explicit `build`, `output`, and `outputConfig` override static detection. Set `vercel.dnsZone` and a site's `domain` to attach a custom domain and reconcile its Cloudflare CNAME on production deploy; the deploy consumer must provide `CLOUDFLARE_API_TOKEN`. Existing unrelated DNS records cause a clear error rather than being replaced. Container services default to `.arcnet/<service>.Dockerfile`. The package selects standard Cloud Run domains when omitted; set `domain` for exceptions. The `gce-worker` module is deferred until its startup mechanism is replaced.
|
|
15
15
|
|
|
16
|
-
When `aws-s3` is selected,
|
|
16
|
+
When `aws-s3` is selected, the conventional `s3` service gets a private `arcnet.<project>.backend` bucket by default. Other S3 services use `arcnet.<project>.<service>`; set `params.bucket` to override either name. ArcNet derives browser CORS origins from the HTTPS domains of selected services and Vercel sites. This permits browser requests made with backend-issued presigned URLs while the bucket remains private.
|
|
17
17
|
|
|
18
18
|
For a new Vercel site, set `mode: new`, `creationApproved: true`, and its `projectName`. The first approved push to `main` creates it if missing; subsequent deploys verify and reuse the named project. `mode: existing` still requires a committed project ID and never creates a project. `arcnet inspect` reports missing new projects without creating them.
|
|
19
19
|
|
package/package.json
CHANGED
package/src/compileArcnet.ts
CHANGED
|
@@ -30,6 +30,8 @@ export const compileTerraform = (config: ArcnetConfig) => {
|
|
|
30
30
|
);
|
|
31
31
|
|
|
32
32
|
for (const [name, service] of Object.entries(services)) {
|
|
33
|
+
if (service.module === "aws-s3")
|
|
34
|
+
service.params.bucket ??= `arcnet.${config.project}.${name === "s3" ? "backend" : name}`;
|
|
33
35
|
if (
|
|
34
36
|
["cloud-run-web", "gce-worker"].includes(service.module) &&
|
|
35
37
|
!service.dockerfile
|