@heyo-sh/heyo-cms 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +44 -2
- package/dist/access/index.d.ts +9 -0
- package/dist/access/index.d.ts.map +1 -0
- package/dist/access/permissions.d.ts +54 -0
- package/dist/access/permissions.d.ts.map +1 -0
- package/dist/adapters/astro.d.ts +38 -0
- package/dist/adapters/astro.d.ts.map +1 -0
- package/dist/adapters/astro.js +1 -0
- package/dist/adapters/next.d.ts +31 -0
- package/dist/adapters/next.d.ts.map +1 -0
- package/dist/adapters/next.js +1 -0
- package/dist/adapters/nuxt.d.ts +47 -0
- package/dist/adapters/nuxt.d.ts.map +1 -0
- package/dist/adapters/nuxt.js +1 -0
- package/dist/adapters/react-router.d.ts +29 -0
- package/dist/adapters/react-router.d.ts.map +1 -0
- package/dist/adapters/react-router.js +1 -0
- package/dist/adapters/sveltekit.d.ts +37 -0
- package/dist/adapters/sveltekit.d.ts.map +1 -0
- package/dist/adapters/sveltekit.js +1 -0
- package/dist/ai/assistant/context.d.ts +64 -0
- package/dist/ai/assistant/context.d.ts.map +1 -0
- package/dist/ai/assistant/limits.d.ts +10 -0
- package/dist/ai/assistant/limits.d.ts.map +1 -0
- package/dist/ai/assistant/plans.d.ts +83 -0
- package/dist/ai/assistant/plans.d.ts.map +1 -0
- package/dist/ai/assistant/prompt.d.ts +22 -0
- package/dist/ai/assistant/prompt.d.ts.map +1 -0
- package/dist/ai/assistant/run.d.ts +59 -0
- package/dist/ai/assistant/run.d.ts.map +1 -0
- package/dist/ai/assistant/runtime.d.ts +35 -0
- package/dist/ai/assistant/runtime.d.ts.map +1 -0
- package/dist/ai/assistant/schema.d.ts +66 -0
- package/dist/ai/assistant/schema.d.ts.map +1 -0
- package/dist/ai/assistant/tools.d.ts +41 -0
- package/dist/ai/assistant/tools.d.ts.map +1 -0
- package/dist/ai/assistant/values.d.ts +33 -0
- package/dist/ai/assistant/values.d.ts.map +1 -0
- package/dist/ai/crypto.d.ts +12 -0
- package/dist/ai/crypto.d.ts.map +1 -0
- package/dist/ai/index.d.ts +19 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/pi.d.ts +89 -0
- package/dist/ai/pi.d.ts.map +1 -0
- package/dist/ai/registry.d.ts +66 -0
- package/dist/ai/registry.d.ts.map +1 -0
- package/dist/ai/service.d.ts +31 -0
- package/dist/ai/service.d.ts.map +1 -0
- package/dist/ai/variant-translation.d.ts +6 -0
- package/dist/ai/variant-translation.d.ts.map +1 -0
- package/dist/ai.d.ts +12 -0
- package/dist/ai.d.ts.map +1 -0
- package/dist/ai.js +1 -0
- package/dist/auth/config.d.ts +65 -0
- package/dist/auth/config.d.ts.map +1 -0
- package/dist/auth/crypto.d.ts +44 -0
- package/dist/auth/crypto.d.ts.map +1 -0
- package/dist/auth/index.d.ts +15 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/oauth.d.ts +93 -0
- package/dist/auth/oauth.d.ts.map +1 -0
- package/dist/auth/service.d.ts +38 -0
- package/dist/auth/service.d.ts.map +1 -0
- package/dist/auth/totp.d.ts +34 -0
- package/dist/auth/totp.d.ts.map +1 -0
- package/dist/auth.d.ts +9 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +30 -0
- package/dist/client/index.d.ts +51 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/types.d.ts +340 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client.d.ts +46 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +1 -0
- package/dist/config.d.ts +31 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +1 -0
- package/dist/content/export.d.ts +28 -0
- package/dist/content/export.d.ts.map +1 -0
- package/dist/content/import.d.ts +65 -0
- package/dist/content/import.d.ts.map +1 -0
- package/dist/content/records.d.ts +73 -0
- package/dist/content/records.d.ts.map +1 -0
- package/dist/content.d.ts +12 -0
- package/dist/content.d.ts.map +1 -0
- package/dist/content.js +1 -0
- package/dist/db/d1.d.ts +29 -0
- package/dist/db/d1.d.ts.map +1 -0
- package/dist/db/d1.js +1 -0
- package/dist/db/mongodb.d.ts +128 -0
- package/dist/db/mongodb.d.ts.map +1 -0
- package/dist/db/mongodb.js +2 -0
- package/dist/db/postgres.d.ts +37 -0
- package/dist/db/postgres.d.ts.map +1 -0
- package/dist/db/postgres.js +1 -0
- package/dist/db/sql/adapter.d.ts +57 -0
- package/dist/db/sql/adapter.d.ts.map +1 -0
- package/dist/db/sql/compile.d.ts +50 -0
- package/dist/db/sql/compile.d.ts.map +1 -0
- package/dist/db/sql/ddl.d.ts +34 -0
- package/dist/db/sql/ddl.d.ts.map +1 -0
- package/dist/db/sql/dialect.d.ts +35 -0
- package/dist/db/sql/dialect.d.ts.map +1 -0
- package/dist/db/sql/driver.d.ts +34 -0
- package/dist/db/sql/driver.d.ts.map +1 -0
- package/dist/db/sql/introspect.d.ts +15 -0
- package/dist/db/sql/introspect.d.ts.map +1 -0
- package/dist/db/sqlite.d.ts +39 -0
- package/dist/db/sqlite.d.ts.map +1 -0
- package/dist/db/sqlite.js +1 -0
- package/dist/defaults.d.ts +5 -0
- package/dist/defaults.d.ts.map +1 -0
- package/dist/duration.d.ts +12 -0
- package/dist/duration.d.ts.map +1 -0
- package/dist/editor/builtin.d.ts +45 -0
- package/dist/editor/builtin.d.ts.map +1 -0
- package/dist/editor/index.d.ts +14 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/markdown.d.ts +19 -0
- package/dist/editor/markdown.d.ts.map +1 -0
- package/dist/editor/registry.d.ts +30 -0
- package/dist/editor/registry.d.ts.map +1 -0
- package/dist/editor/serialize.d.ts +41 -0
- package/dist/editor/serialize.d.ts.map +1 -0
- package/dist/editor.d.ts +10 -0
- package/dist/editor.d.ts.map +1 -0
- package/dist/editor.js +1 -0
- package/dist/engine/access.d.ts +33 -0
- package/dist/engine/access.d.ts.map +1 -0
- package/dist/engine/activity.d.ts +16 -0
- package/dist/engine/activity.d.ts.map +1 -0
- package/dist/engine/cursor.d.ts +19 -0
- package/dist/engine/cursor.d.ts.map +1 -0
- package/dist/engine/documents.d.ts +81 -0
- package/dist/engine/documents.d.ts.map +1 -0
- package/dist/engine/engine.d.ts +276 -0
- package/dist/engine/engine.d.ts.map +1 -0
- package/dist/engine/field-access.d.ts +21 -0
- package/dist/engine/field-access.d.ts.map +1 -0
- package/dist/engine/hooks.d.ts +58 -0
- package/dist/engine/hooks.d.ts.map +1 -0
- package/dist/engine/index.d.ts +20 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/jobs.d.ts +63 -0
- package/dist/engine/jobs.d.ts.map +1 -0
- package/dist/engine/locales.d.ts +40 -0
- package/dist/engine/locales.d.ts.map +1 -0
- package/dist/engine/outbox.d.ts +81 -0
- package/dist/engine/outbox.d.ts.map +1 -0
- package/dist/engine/relations.d.ts +60 -0
- package/dist/engine/relations.d.ts.map +1 -0
- package/dist/engine/scoped-db.d.ts +13 -0
- package/dist/engine/scoped-db.d.ts.map +1 -0
- package/dist/engine/trash.d.ts +25 -0
- package/dist/engine/trash.d.ts.map +1 -0
- package/dist/errors.d.ts +42 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/fields/builtin.d.ts +142 -0
- package/dist/fields/builtin.d.ts.map +1 -0
- package/dist/fields/index.d.ts +3 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/registry.d.ts +35 -0
- package/dist/fields/registry.d.ts.map +1 -0
- package/dist/fields.d.ts +8 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +1 -0
- package/dist/http/guard.d.ts +45 -0
- package/dist/http/guard.d.ts.map +1 -0
- package/dist/http/handler.d.ts +31 -0
- package/dist/http/handler.d.ts.map +1 -0
- package/dist/http/index.d.ts +13 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/openapi.d.ts +5 -0
- package/dist/http/openapi.d.ts.map +1 -0
- package/dist/http/params.d.ts +32 -0
- package/dist/http/params.d.ts.map +1 -0
- package/dist/http/request-db.d.ts +19 -0
- package/dist/http/request-db.d.ts.map +1 -0
- package/dist/http/respond.d.ts +48 -0
- package/dist/http/respond.d.ts.map +1 -0
- package/dist/http/rich-text.d.ts +30 -0
- package/dist/http/rich-text.d.ts.map +1 -0
- package/dist/http/router.d.ts +55 -0
- package/dist/http/router.d.ts.map +1 -0
- package/dist/http/routes/access.d.ts +13 -0
- package/dist/http/routes/access.d.ts.map +1 -0
- package/dist/http/routes/admin.d.ts +28 -0
- package/dist/http/routes/admin.d.ts.map +1 -0
- package/dist/http/routes/ai.d.ts +26 -0
- package/dist/http/routes/ai.d.ts.map +1 -0
- package/dist/http/routes/auth.d.ts +13 -0
- package/dist/http/routes/auth.d.ts.map +1 -0
- package/dist/http/routes/documents.d.ts +24 -0
- package/dist/http/routes/documents.d.ts.map +1 -0
- package/dist/http/routes/generate.d.ts +5 -0
- package/dist/http/routes/generate.d.ts.map +1 -0
- package/dist/http/routes/media.d.ts +28 -0
- package/dist/http/routes/media.d.ts.map +1 -0
- package/dist/http/routes/panel.d.ts +20 -0
- package/dist/http/routes/panel.d.ts.map +1 -0
- package/dist/http/routes/system.d.ts +25 -0
- package/dist/http/routes/system.d.ts.map +1 -0
- package/dist/http/routes/webhooks.d.ts +17 -0
- package/dist/http/routes/webhooks.d.ts.map +1 -0
- package/dist/http/spec.d.ts +28 -0
- package/dist/http/spec.d.ts.map +1 -0
- package/dist/http.d.ts +17 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +1 -0
- package/dist/i18n/index.d.ts +12 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/names.d.ts +25 -0
- package/dist/i18n/names.d.ts.map +1 -0
- package/dist/ids.d.ts +28 -0
- package/dist/ids.d.ts.map +1 -0
- package/dist/index-2757kej5.js +2 -0
- package/dist/index-2kb5nbxx.js +2 -0
- package/dist/index-2z1qe5mw.js +2 -0
- package/dist/index-34s342fz.js +2 -0
- package/dist/index-5ngtc7gy.js +2 -0
- package/dist/index-7a231xfp.js +2 -0
- package/dist/index-7k091gpe.js +2 -0
- package/dist/index-9g2n7xa6.js +2 -0
- package/dist/index-9x1z3b85.js +5 -0
- package/dist/index-9zqnf6gx.js +23 -0
- package/dist/index-b2ecggck.js +26 -0
- package/dist/index-cbwwtcm4.js +2 -0
- package/dist/index-ebtj6ebd.js +0 -0
- package/dist/index-g4crf47y.js +0 -0
- package/dist/index-gpwcmmvr.js +2 -0
- package/dist/index-hq05mc1n.js +3 -0
- package/dist/index-hy1x46nf.js +2 -0
- package/dist/index-k8wbg1dw.js +2 -0
- package/dist/index-kbsgt44t.js +2 -0
- package/dist/index-m82a0shw.js +2 -0
- package/dist/index-md79xr6h.js +5 -0
- package/dist/index-nvgwyykk.js +40 -0
- package/dist/index-ty698y02.js +2 -0
- package/dist/index-vq2978e7.js +14 -0
- package/dist/index-vxw0a03g.js +2 -0
- package/dist/index-wj8y1xcj.js +2 -0
- package/dist/index-x72d1hzh.js +2 -0
- package/dist/index-y5mwknr9.js +2 -0
- package/dist/index-ymq6jsar.js +2 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/jobs/runner.d.ts +77 -0
- package/dist/jobs/runner.d.ts.map +1 -0
- package/dist/jobs.d.ts +11 -0
- package/dist/jobs.d.ts.map +1 -0
- package/dist/jobs.js +1 -0
- package/dist/media/document.d.ts +28 -0
- package/dist/media/document.d.ts.map +1 -0
- package/dist/media/gc.d.ts +46 -0
- package/dist/media/gc.d.ts.map +1 -0
- package/dist/media/index.d.ts +20 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/pipeline.d.ts +36 -0
- package/dist/media/pipeline.d.ts.map +1 -0
- package/dist/media/probe.d.ts +6 -0
- package/dist/media/probe.d.ts.map +1 -0
- package/dist/media/service.d.ts +26 -0
- package/dist/media/service.d.ts.map +1 -0
- package/dist/media/sharp.d.ts +28 -0
- package/dist/media/sharp.d.ts.map +1 -0
- package/dist/media/strip.d.ts +16 -0
- package/dist/media/strip.d.ts.map +1 -0
- package/dist/media/usages.d.ts +69 -0
- package/dist/media/usages.d.ts.map +1 -0
- package/dist/media/variants.d.ts +50 -0
- package/dist/media/variants.d.ts.map +1 -0
- package/dist/migrations.d.ts +115 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +1 -0
- package/dist/panel.d.ts +31 -0
- package/dist/panel.d.ts.map +1 -0
- package/dist/query.d.ts +40 -0
- package/dist/query.d.ts.map +1 -0
- package/dist/query.js +1 -0
- package/dist/run-3r72dwhs.js +6 -0
- package/dist/schema/describe.d.ts +19 -0
- package/dist/schema/describe.d.ts.map +1 -0
- package/dist/schema/index.d.ts +5 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/plan.d.ts +20 -0
- package/dist/schema/plan.d.ts.map +1 -0
- package/dist/schema/snapshot.d.ts +22 -0
- package/dist/schema/snapshot.d.ts.map +1 -0
- package/dist/schema/system.d.ts +22 -0
- package/dist/schema/system.d.ts.map +1 -0
- package/dist/schema.d.ts +7 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +1 -0
- package/dist/storage/bytes.d.ts +17 -0
- package/dist/storage/bytes.d.ts.map +1 -0
- package/dist/storage/http.d.ts +43 -0
- package/dist/storage/http.d.ts.map +1 -0
- package/dist/storage/local.d.ts +31 -0
- package/dist/storage/local.d.ts.map +1 -0
- package/dist/storage/providers.d.ts +95 -0
- package/dist/storage/providers.d.ts.map +1 -0
- package/dist/storage/sign.d.ts +53 -0
- package/dist/storage/sign.d.ts.map +1 -0
- package/dist/strings.d.ts +13 -0
- package/dist/strings.d.ts.map +1 -0
- package/dist/telemetry.d.ts +137 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +1 -0
- package/dist/types/activity.d.ts +68 -0
- package/dist/types/activity.d.ts.map +1 -0
- package/dist/types/actor.d.ts +26 -0
- package/dist/types/actor.d.ts.map +1 -0
- package/dist/types/ai.d.ts +357 -0
- package/dist/types/ai.d.ts.map +1 -0
- package/dist/types/api.d.ts +212 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/auth.d.ts +310 -0
- package/dist/types/auth.d.ts.map +1 -0
- package/dist/types/config.d.ts +632 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/database.d.ts +75 -0
- package/dist/types/database.d.ts.map +1 -0
- package/dist/types/editor.d.ts +140 -0
- package/dist/types/editor.d.ts.map +1 -0
- package/dist/types/events.d.ts +72 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/fields.d.ts +142 -0
- package/dist/types/fields.d.ts.map +1 -0
- package/dist/types/hooks.d.ts +142 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/index.d.ts +25 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/instance.d.ts +263 -0
- package/dist/types/instance.d.ts.map +1 -0
- package/dist/types/jobs.d.ts +78 -0
- package/dist/types/jobs.d.ts.map +1 -0
- package/dist/types/json.d.ts +24 -0
- package/dist/types/json.d.ts.map +1 -0
- package/dist/types/locales.d.ts +30 -0
- package/dist/types/locales.d.ts.map +1 -0
- package/dist/types/media.d.ts +245 -0
- package/dist/types/media.d.ts.map +1 -0
- package/dist/types/panel.d.ts +249 -0
- package/dist/types/panel.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +172 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/query.d.ts +101 -0
- package/dist/types/query.d.ts.map +1 -0
- package/dist/types/schema.d.ts +203 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/storage.d.ts +61 -0
- package/dist/types/storage.d.ts.map +1 -0
- package/dist/types/telemetry.d.ts +14 -0
- package/dist/types/telemetry.d.ts.map +1 -0
- package/dist/types/trash.d.ts +42 -0
- package/dist/types/trash.d.ts.map +1 -0
- package/dist/types/webhooks.d.ts +133 -0
- package/dist/types/webhooks.d.ts.map +1 -0
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/uploads.d.ts +21 -0
- package/dist/uploads.d.ts.map +1 -0
- package/dist/uploads.js +9 -0
- package/dist/webhooks/index.d.ts +10 -0
- package/dist/webhooks/index.d.ts.map +1 -0
- package/dist/webhooks/job.d.ts +17 -0
- package/dist/webhooks/job.d.ts.map +1 -0
- package/dist/webhooks/service.d.ts +53 -0
- package/dist/webhooks/service.d.ts.map +1 -0
- package/dist/webhooks/sign.d.ts +26 -0
- package/dist/webhooks/sign.d.ts.map +1 -0
- package/dist/webhooks.d.ts +10 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +1 -0
- package/package.json +183 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/storage/providers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,qBAAqB,EAEtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAchE,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IAChC,UAAU,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,MAAM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AAqB,CAuBvB;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,gBAAgB,EAChB,UAAU,GAAG,gBAAgB,CAC9B;IACC,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,iBAAiB,GAAG,qBAAqB,CAerE;AAED,MAAM,WAAW,mBAAmB;IAClC,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IAC5D,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,oDAAoD;AACpD,wBAAgB,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,qBAAqB,CAsCzE"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request signing for the object stores we speak to over HTTP.
|
|
3
|
+
*
|
|
4
|
+
* Written out rather than taken from an SDK on purpose. `@aws-sdk/client-s3`
|
|
5
|
+
* is roughly twenty megabytes of dependency for four HTTP verbs, which is the
|
|
6
|
+
* entire installation budget this project set itself (section 0), and it does
|
|
7
|
+
* not run unchanged on every runtime we target. Signing is about ninety lines
|
|
8
|
+
* when the only operations are PUT, GET, DELETE and HEAD.
|
|
9
|
+
*/
|
|
10
|
+
export interface AwsCredentials {
|
|
11
|
+
accessKeyId: string;
|
|
12
|
+
secretAccessKey: string;
|
|
13
|
+
/** Set when the credentials come from an assumed role. */
|
|
14
|
+
sessionToken?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AwsSignRequest {
|
|
17
|
+
method: string;
|
|
18
|
+
url: URL;
|
|
19
|
+
headers: Record<string, string>;
|
|
20
|
+
/** `UNSIGNED-PAYLOAD` is legal over TLS and avoids buffering a stream. */
|
|
21
|
+
payload: Uint8Array | "UNSIGNED-PAYLOAD";
|
|
22
|
+
region: string;
|
|
23
|
+
service: string;
|
|
24
|
+
credentials: AwsCredentials;
|
|
25
|
+
now?: Date;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* AWS Signature Version 4.
|
|
29
|
+
*
|
|
30
|
+
* Used for S3, for R2 (which speaks the S3 API) and for Google Cloud Storage
|
|
31
|
+
* through its S3-compatible XML endpoint, so one implementation covers three
|
|
32
|
+
* of the five adapters.
|
|
33
|
+
*/
|
|
34
|
+
export declare function signAwsV4(request: AwsSignRequest): Promise<Record<string, string>>;
|
|
35
|
+
export interface AzureSignRequest {
|
|
36
|
+
method: string;
|
|
37
|
+
url: URL;
|
|
38
|
+
headers: Record<string, string>;
|
|
39
|
+
account: string;
|
|
40
|
+
/** The base64 account key from the portal. */
|
|
41
|
+
key: string;
|
|
42
|
+
contentLength?: number;
|
|
43
|
+
now?: Date;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Azure Blob Storage shared key.
|
|
47
|
+
*
|
|
48
|
+
* A different scheme from SigV4 and not reducible to it: the string to sign is
|
|
49
|
+
* a fixed list of positional headers, most of which we never send and all of
|
|
50
|
+
* which still have to be there as empty lines.
|
|
51
|
+
*/
|
|
52
|
+
export declare function signAzure(request: AzureSignRequest): Promise<Record<string, string>>;
|
|
53
|
+
//# sourceMappingURL=sign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign.d.ts","sourceRoot":"","sources":["../../src/storage/sign.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,0EAA0E;IAC1E,OAAO,EAAE,UAAU,GAAG,kBAAkB,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,cAAc,CAAC;IAC5B,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AAID;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA8DjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AAED;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAsDjC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* String helpers shared across modules.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Remove trailing slashes without a regex.
|
|
6
|
+
*
|
|
7
|
+
* The obvious `replace(/\/+$/, "")` backtracks quadratically on a string
|
|
8
|
+
* built out of slashes (CodeQL `js/polynomial-redos`). The values trimmed
|
|
9
|
+
* here are configuration most of the time, but a loop from the end is linear
|
|
10
|
+
* no matter what arrives, so every caller uses it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function trimTrailingSlashes(value: string): string;
|
|
13
|
+
//# sourceMappingURL=strings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIzD"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type { CmsInstance } from "./types/instance";
|
|
2
|
+
import type { TelemetryConfig } from "./types/telemetry";
|
|
3
|
+
export type { TelemetryConfig };
|
|
4
|
+
/**
|
|
5
|
+
* Adoption telemetry — what it is, and what it refuses to be.
|
|
6
|
+
*
|
|
7
|
+
* The CMS has no analytics on the deployments it runs in: a server built from
|
|
8
|
+
* this package never phones home, in any environment, for any reason. What
|
|
9
|
+
* does report is the **command line**: `heyo-cms generate`, `migrate`,
|
|
10
|
+
* `seed`, `create-admin`, `import`, `export`, and the project generator. Those
|
|
11
|
+
* run on a developer's machine, once in a while, and answer the only question
|
|
12
|
+
* the project actually needs answered — is anybody using this, and with which
|
|
13
|
+
* database and framework.
|
|
14
|
+
*
|
|
15
|
+
* What is sent is in `TelemetryPayload` below and nowhere else. It is a fixed
|
|
16
|
+
* set of counts and identifiers: no content, no field names, no connection
|
|
17
|
+
* strings, no file paths, no addresses, no keys. `heyo-cms telemetry` prints
|
|
18
|
+
* the exact body that would be sent, so the claim is checkable rather than
|
|
19
|
+
* promised.
|
|
20
|
+
*
|
|
21
|
+
* Opting out, any one of which is enough:
|
|
22
|
+
*
|
|
23
|
+
* HEYO_TELEMETRY_DISABLED=1 the project's own switch
|
|
24
|
+
* DO_NOT_TRACK=1 the cross-tool convention, honoured
|
|
25
|
+
* telemetry: { enabled: false } in heyo-cms.config.ts
|
|
26
|
+
*
|
|
27
|
+
* It is also off, without being asked, on CI and under a test runner: a build
|
|
28
|
+
* agent is not a user, and counting one as a user would make the number this
|
|
29
|
+
* exists to produce worthless.
|
|
30
|
+
*/
|
|
31
|
+
export declare const telemetryEndpoint = "https://telemetry.heyo.sh/v1/cms";
|
|
32
|
+
export interface TelemetryDecision {
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
/** Why, in words, so `heyo-cms telemetry` can print it. */
|
|
35
|
+
reason: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The whole payload. Adding a field here is a documentation change too.
|
|
39
|
+
*/
|
|
40
|
+
export interface TelemetryPayload {
|
|
41
|
+
/** The command that ran: `generate`, `migrate`, `create`, ... */
|
|
42
|
+
event: string;
|
|
43
|
+
/** The version of `@heyo-sh/heyo-cms` that sent it. */
|
|
44
|
+
version: string;
|
|
45
|
+
/**
|
|
46
|
+
* A project identifier that is not a project.
|
|
47
|
+
*
|
|
48
|
+
* The SHA-256 of the configuration's shape — collection names, the database
|
|
49
|
+
* id, the base path — truncated to 16 hex characters. Two runs from the
|
|
50
|
+
* same shape agree. This is not a unique installation id: projects with
|
|
51
|
+
* the same shape collide, and low-entropy inputs can be guessed. It must
|
|
52
|
+
* not be treated as a count of distinct users or as encryption.
|
|
53
|
+
*/
|
|
54
|
+
project: string;
|
|
55
|
+
runtime: {
|
|
56
|
+
name: string;
|
|
57
|
+
version: string;
|
|
58
|
+
};
|
|
59
|
+
system: {
|
|
60
|
+
platform: string;
|
|
61
|
+
arch: string;
|
|
62
|
+
release: string;
|
|
63
|
+
};
|
|
64
|
+
/** The adapter id: `postgres`, `sqlite`, `d1`, `mongodb`. */
|
|
65
|
+
database: string;
|
|
66
|
+
/** Counts, never names. */
|
|
67
|
+
usage: {
|
|
68
|
+
collections: number;
|
|
69
|
+
globals: number;
|
|
70
|
+
fields: number;
|
|
71
|
+
plugins: number;
|
|
72
|
+
locales: number;
|
|
73
|
+
};
|
|
74
|
+
/** Which optional sections exist. Booleans, never their configuration. */
|
|
75
|
+
features: {
|
|
76
|
+
/** The panel bundle is mounted. */
|
|
77
|
+
panel: boolean;
|
|
78
|
+
/** Editor authentication is configured. */
|
|
79
|
+
auth: boolean;
|
|
80
|
+
/** The storage adapter id, or `null` when the CMS stores no files. */
|
|
81
|
+
uploads: string | null;
|
|
82
|
+
ai: boolean;
|
|
83
|
+
webhooks: boolean;
|
|
84
|
+
trash: boolean;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export interface TelemetryEnvironment {
|
|
88
|
+
[key: string]: string | undefined;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Decides whether anything may be sent, and says why.
|
|
92
|
+
*
|
|
93
|
+
* Every branch returns a sentence rather than a boolean alone, because the
|
|
94
|
+
* question a person asks is never "is it on" — it is "why is it on".
|
|
95
|
+
*/
|
|
96
|
+
export declare function telemetryDecision(config: TelemetryConfig | undefined, environment?: TelemetryEnvironment): TelemetryDecision;
|
|
97
|
+
/**
|
|
98
|
+
* Builds the body from the configuration.
|
|
99
|
+
*
|
|
100
|
+
* Deliberately total: it never reads a file, never resolves a database and
|
|
101
|
+
* never touches the network, so printing it costs nothing and cannot fail in
|
|
102
|
+
* a way that breaks the command it was attached to.
|
|
103
|
+
*/
|
|
104
|
+
export declare function telemetryPayload(event: string, cms: CmsInstance, version: string): TelemetryPayload;
|
|
105
|
+
export interface SendOptions {
|
|
106
|
+
endpoint?: string;
|
|
107
|
+
/** Injected by the tests; nothing else should pass it. */
|
|
108
|
+
fetch?: typeof fetch;
|
|
109
|
+
/** Milliseconds before the attempt is abandoned. */
|
|
110
|
+
timeout?: number;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Sends one payload, and never matters.
|
|
114
|
+
*
|
|
115
|
+
* Failure is not reported and not retried: a CLI that took longer, printed a
|
|
116
|
+
* warning or exited non-zero because a telemetry endpoint was down would be a
|
|
117
|
+
* worse tool than one with no telemetry at all.
|
|
118
|
+
*/
|
|
119
|
+
export declare function sendTelemetry(payload: TelemetryPayload, options?: SendOptions): Promise<"sent" | "failed">;
|
|
120
|
+
/**
|
|
121
|
+
* The one call a command makes: decide, build, send, forget.
|
|
122
|
+
*
|
|
123
|
+
* Returns what happened so `heyo-cms telemetry` can print it; every caller
|
|
124
|
+
* except that command ignores the result.
|
|
125
|
+
*/
|
|
126
|
+
export declare function reportTelemetry(args: {
|
|
127
|
+
event: string;
|
|
128
|
+
cms: CmsInstance;
|
|
129
|
+
version: string;
|
|
130
|
+
config?: TelemetryConfig;
|
|
131
|
+
environment?: TelemetryEnvironment;
|
|
132
|
+
send?: SendOptions;
|
|
133
|
+
}): Promise<{
|
|
134
|
+
decision: TelemetryDecision;
|
|
135
|
+
result: "sent" | "failed" | "skipped";
|
|
136
|
+
}>;
|
|
137
|
+
//# sourceMappingURL=telemetry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,eAAO,MAAM,iBAAiB,qCAAqC,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,MA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OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,CAa5B;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,WAAW,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,GAAG,OAAO,CAAC;IACV,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;CACvC,CAAC,CASD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{uo,St,Ot,po,an}from"./index-34s342fz.js";export{an as reportTelemetry,po as sendTelemetry,St as telemetryDecision,uo as telemetryEndpoint,Ot as telemetryPayload};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { ActorSource, OperationSource } from "./actor";
|
|
2
|
+
import type { JsonObject } from "./json";
|
|
3
|
+
/**
|
|
4
|
+
* One line of the audit trail.
|
|
5
|
+
*
|
|
6
|
+
* Written by the engine inside the transaction that caused it, which is the
|
|
7
|
+
* difference between an audit trail and a log: a change that committed is in
|
|
8
|
+
* here, and a change that rolled back is not (section 11).
|
|
9
|
+
*/
|
|
10
|
+
export interface ActivityEntry {
|
|
11
|
+
id: string;
|
|
12
|
+
/** `document.created`, `document.trashed`, … — the event vocabulary. */
|
|
13
|
+
action: string;
|
|
14
|
+
actorId: string | null;
|
|
15
|
+
actorSource: ActorSource | null;
|
|
16
|
+
/**
|
|
17
|
+
* Where the write came from: `admin`, `rest`, `job`, `ai`, …
|
|
18
|
+
*
|
|
19
|
+
* Distinct from `actorSource`, which says how the actor authenticated. An AI
|
|
20
|
+
* write has a human actor with a session and `source: "ai"`, and a trail
|
|
21
|
+
* that could only report one of those could not answer "what did the
|
|
22
|
+
* assistant change today".
|
|
23
|
+
*/
|
|
24
|
+
source: OperationSource | null;
|
|
25
|
+
collection: string | null;
|
|
26
|
+
documentId: string | null;
|
|
27
|
+
locale: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* `{ fields: [...] }` for a write: what actually changed.
|
|
30
|
+
*
|
|
31
|
+
* Carries `runId` as well when the assistant made the change, which is what
|
|
32
|
+
* ties a row back to the conversation that caused it.
|
|
33
|
+
*/
|
|
34
|
+
changes: JsonObject | null;
|
|
35
|
+
ip: string | null;
|
|
36
|
+
createdAt: string | null;
|
|
37
|
+
}
|
|
38
|
+
export interface ActivityListArgs {
|
|
39
|
+
collection?: string;
|
|
40
|
+
documentId?: string;
|
|
41
|
+
actorId?: string;
|
|
42
|
+
action?: string;
|
|
43
|
+
/** `"ai"` answers "what did the assistant change" without a scan. */
|
|
44
|
+
source?: OperationSource;
|
|
45
|
+
limit?: number;
|
|
46
|
+
/** Keyset, over the ordered id. Pass back `cursor` from the last page. */
|
|
47
|
+
cursor?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface ActivityPage {
|
|
50
|
+
entries: ActivityEntry[];
|
|
51
|
+
limit: number;
|
|
52
|
+
hasNextPage: boolean;
|
|
53
|
+
cursor: string | null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* `cms.activity`.
|
|
57
|
+
*
|
|
58
|
+
* Read-only on purpose: there is no `write` and no `delete`. The engine is the
|
|
59
|
+
* only writer, and an audit trail with a delete method is a list of the
|
|
60
|
+
* changes somebody was willing to leave behind.
|
|
61
|
+
*
|
|
62
|
+
* Paged by the row id rather than by `created_at`, because the ids are ordered
|
|
63
|
+
* and two writes to the same document routinely land in the same millisecond.
|
|
64
|
+
*/
|
|
65
|
+
export interface CmsActivity {
|
|
66
|
+
list(args?: ActivityListArgs): Promise<ActivityPage>;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=activity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACtD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who is performing an operation.
|
|
3
|
+
*
|
|
4
|
+
* Both authentication methods (editor session, machine API key) collapse into
|
|
5
|
+
* the same shape on purpose: every access rule, hook and activity-log entry
|
|
6
|
+
* then has one thing to read, and a rule written against sessions cannot
|
|
7
|
+
* silently stop applying to API keys.
|
|
8
|
+
*/
|
|
9
|
+
export interface Actor {
|
|
10
|
+
id: string;
|
|
11
|
+
source: ActorSource;
|
|
12
|
+
roles: string[];
|
|
13
|
+
/** Flattened `collection:action` grants, wildcards already expanded. */
|
|
14
|
+
permissions: string[];
|
|
15
|
+
}
|
|
16
|
+
export type ActorSource = "session" | "api-key";
|
|
17
|
+
/**
|
|
18
|
+
* Where an operation entered the engine. Carried through to hooks and events.
|
|
19
|
+
*
|
|
20
|
+
* `ai` is the global assistant writing on an editor's behalf. It is a source
|
|
21
|
+
* and not an actor: the person who asked for the change is still the actor,
|
|
22
|
+
* because "who is accountable" and "what typed it" are different questions and
|
|
23
|
+
* an audit trail that confuses them cannot answer either.
|
|
24
|
+
*/
|
|
25
|
+
export type OperationSource = "rest" | "admin" | "local" | "cli" | "job" | "ai";
|
|
26
|
+
//# sourceMappingURL=actor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../../src/types/actor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,wEAAwE;IACxE,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC"}
|