@tollwyn/baukasten 1.2.2 → 1.3.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.
@@ -1,20 +1,29 @@
1
1
  /**
2
- * The variables the delivery service sets for every web app, in its order
2
+ * The variables the delivery service sets for every web app that the baukasten reads, in its order
3
3
  * (`standard-variables.test.ts` holds them against the delivery service).
4
4
  */
5
- export declare const STANDARD_VARIABLES: readonly ["PUBLIC_ORIGIN", "PORT", "DATABASE_URL", "SMTP_HOST", "SMTP_PORT", "MAIL_FROM", "MAIL_FROM_NAME", "OPERATOR_NAME", "OPERATOR_ADDRESS", "OPERATOR_REGISTER", "OPERATOR_VAT", "OPERATOR_JURISDICTION", "HOSTING_LOCATION", "STRIPE_SECRET_KEY", "STRIPE_WEBHOOK_SECRET", "VERTRIEB_TOKEN"];
5
+ export declare const STANDARD_VARIABLES: readonly ["PUBLIC_ORIGIN", "PORT", "DATABASE_URL", "SMTP_HOST", "SMTP_PORT", "MAIL_FROM", "MAIL_FROM_NAME", "OPERATOR_NAME", "OPERATOR_ADDRESS", "OPERATOR_REGISTER", "OPERATOR_VAT", "OPERATOR_JURISDICTION", "STRIPE_SECRET_KEY", "STRIPE_WEBHOOK_SECRET", "VERTRIEB_TOKEN"];
6
6
  export type StandardVariable = (typeof STANDARD_VARIABLES)[number];
7
7
  /**
8
- * The variables the delivery service sets for every Shopify app, in its order; the Partner API alone
9
- * says the plan of a shop.
8
+ * The variables the delivery service sets for every Shopify app that the baukasten reads, in its
9
+ * order; the Partner API alone says the plan of a shop.
10
10
  */
11
- export declare const SHOPIFY_STANDARD_VARIABLES: readonly ["PUBLIC_ORIGIN", "PORT", "DATABASE_URL", "SMTP_HOST", "SMTP_PORT", "MAIL_FROM", "MAIL_FROM_NAME", "OPERATOR_NAME", "OPERATOR_ADDRESS", "HOSTING_LOCATION", "VERTRIEB_TOKEN", "SHOPIFY_API_SECRET", "SHOPIFY_TOKEN_KEY", "SHOPIFY_PARTNER_TOKEN", "SHOPIFY_PARTNER_ORG"];
11
+ export declare const SHOPIFY_STANDARD_VARIABLES: readonly ["PUBLIC_ORIGIN", "PORT", "DATABASE_URL", "SMTP_HOST", "SMTP_PORT", "MAIL_FROM", "MAIL_FROM_NAME", "OPERATOR_NAME", "OPERATOR_ADDRESS", "VERTRIEB_TOKEN", "SHOPIFY_API_SECRET", "SHOPIFY_TOKEN_KEY", "SHOPIFY_PARTNER_TOKEN", "SHOPIFY_PARTNER_ORG"];
12
12
  export type ShopifyStandardVariable = (typeof SHOPIFY_STANDARD_VARIABLES)[number];
13
+ /**
14
+ * Standard variables an earlier version required and this one reads in neither art. The delivery
15
+ * service sets them as long as a product runs on such a version: a product starts with them as
16
+ * without, its .env.example may name them, and none takes one for its own.
17
+ */
18
+ export declare const RETIRED_VARIABLES: readonly ["HOSTING_LOCATION"];
13
19
  /**
14
20
  * Every variable the baukasten reads in a web app. NODE_ENV comes from the image, and the server sets
15
21
  * ORIGIN from PUBLIC_ORIGIN.
16
22
  */
17
- export declare const WEBAPP_VARIABLES: readonly ["PUBLIC_ORIGIN", "PORT", "DATABASE_URL", "SMTP_HOST", "SMTP_PORT", "MAIL_FROM", "MAIL_FROM_NAME", "OPERATOR_NAME", "OPERATOR_ADDRESS", "OPERATOR_REGISTER", "OPERATOR_VAT", "OPERATOR_JURISDICTION", "HOSTING_LOCATION", "STRIPE_SECRET_KEY", "STRIPE_WEBHOOK_SECRET", "VERTRIEB_TOKEN", "LOG_LEVEL", "TEST_DATABASE_URL", "STRIPE_API_BASE"];
18
- export declare const SHOPIFY_VARIABLES: readonly ["PUBLIC_ORIGIN", "PORT", "DATABASE_URL", "SMTP_HOST", "SMTP_PORT", "MAIL_FROM", "MAIL_FROM_NAME", "OPERATOR_NAME", "OPERATOR_ADDRESS", "HOSTING_LOCATION", "VERTRIEB_TOKEN", "SHOPIFY_API_SECRET", "SHOPIFY_TOKEN_KEY", "SHOPIFY_PARTNER_TOKEN", "SHOPIFY_PARTNER_ORG", "LOG_LEVEL", "TEST_DATABASE_URL", "SHOPIFY_API_BASE", "SHOPIFY_CLIENT_ID"];
19
- /** Every variable the baukasten reads in a product of either art: no product takes one for its own. */
20
- export declare const BAUKASTEN_VARIABLES: ("PUBLIC_ORIGIN" | "PORT" | "DATABASE_URL" | "SMTP_HOST" | "SMTP_PORT" | "MAIL_FROM" | "MAIL_FROM_NAME" | "OPERATOR_NAME" | "OPERATOR_ADDRESS" | "OPERATOR_REGISTER" | "OPERATOR_VAT" | "OPERATOR_JURISDICTION" | "HOSTING_LOCATION" | "STRIPE_SECRET_KEY" | "STRIPE_WEBHOOK_SECRET" | "VERTRIEB_TOKEN" | "SHOPIFY_API_SECRET" | "SHOPIFY_TOKEN_KEY" | "SHOPIFY_PARTNER_TOKEN" | "SHOPIFY_PARTNER_ORG" | "LOG_LEVEL" | "TEST_DATABASE_URL" | "STRIPE_API_BASE" | "SHOPIFY_API_BASE" | "SHOPIFY_CLIENT_ID")[];
23
+ export declare const WEBAPP_VARIABLES: readonly ["PUBLIC_ORIGIN", "PORT", "DATABASE_URL", "SMTP_HOST", "SMTP_PORT", "MAIL_FROM", "MAIL_FROM_NAME", "OPERATOR_NAME", "OPERATOR_ADDRESS", "OPERATOR_REGISTER", "OPERATOR_VAT", "OPERATOR_JURISDICTION", "STRIPE_SECRET_KEY", "STRIPE_WEBHOOK_SECRET", "VERTRIEB_TOKEN", "LOG_LEVEL", "TEST_DATABASE_URL", "STRIPE_API_BASE"];
24
+ export declare const SHOPIFY_VARIABLES: readonly ["PUBLIC_ORIGIN", "PORT", "DATABASE_URL", "SMTP_HOST", "SMTP_PORT", "MAIL_FROM", "MAIL_FROM_NAME", "OPERATOR_NAME", "OPERATOR_ADDRESS", "VERTRIEB_TOKEN", "SHOPIFY_API_SECRET", "SHOPIFY_TOKEN_KEY", "SHOPIFY_PARTNER_TOKEN", "SHOPIFY_PARTNER_ORG", "LOG_LEVEL", "TEST_DATABASE_URL", "SHOPIFY_API_BASE", "SHOPIFY_CLIENT_ID"];
25
+ /**
26
+ * Every variable the baukasten reads in a product of either art, and those it no longer reads: no
27
+ * product takes one for its own.
28
+ */
29
+ export declare const BAUKASTEN_VARIABLES: ("PUBLIC_ORIGIN" | "PORT" | "DATABASE_URL" | "SMTP_HOST" | "SMTP_PORT" | "MAIL_FROM" | "MAIL_FROM_NAME" | "OPERATOR_NAME" | "OPERATOR_ADDRESS" | "OPERATOR_REGISTER" | "OPERATOR_VAT" | "OPERATOR_JURISDICTION" | "STRIPE_SECRET_KEY" | "STRIPE_WEBHOOK_SECRET" | "VERTRIEB_TOKEN" | "SHOPIFY_API_SECRET" | "SHOPIFY_TOKEN_KEY" | "SHOPIFY_PARTNER_TOKEN" | "SHOPIFY_PARTNER_ORG" | "HOSTING_LOCATION" | "LOG_LEVEL" | "TEST_DATABASE_URL" | "STRIPE_API_BASE" | "SHOPIFY_API_BASE" | "SHOPIFY_CLIENT_ID")[];
package/dist/variables.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The variables the delivery service sets for every web app, in its order
2
+ * The variables the delivery service sets for every web app that the baukasten reads, in its order
3
3
  * (`standard-variables.test.ts` holds them against the delivery service).
4
4
  */
5
5
  export const STANDARD_VARIABLES = [
@@ -15,14 +15,13 @@ export const STANDARD_VARIABLES = [
15
15
  'OPERATOR_REGISTER',
16
16
  'OPERATOR_VAT',
17
17
  'OPERATOR_JURISDICTION',
18
- 'HOSTING_LOCATION',
19
18
  'STRIPE_SECRET_KEY',
20
19
  'STRIPE_WEBHOOK_SECRET',
21
20
  'VERTRIEB_TOKEN'
22
21
  ];
23
22
  /**
24
- * The variables the delivery service sets for every Shopify app, in its order; the Partner API alone
25
- * says the plan of a shop.
23
+ * The variables the delivery service sets for every Shopify app that the baukasten reads, in its
24
+ * order; the Partner API alone says the plan of a shop.
26
25
  */
27
26
  export const SHOPIFY_STANDARD_VARIABLES = [
28
27
  'PUBLIC_ORIGIN',
@@ -34,13 +33,18 @@ export const SHOPIFY_STANDARD_VARIABLES = [
34
33
  'MAIL_FROM_NAME',
35
34
  'OPERATOR_NAME',
36
35
  'OPERATOR_ADDRESS',
37
- 'HOSTING_LOCATION',
38
36
  'VERTRIEB_TOKEN',
39
37
  'SHOPIFY_API_SECRET',
40
38
  'SHOPIFY_TOKEN_KEY',
41
39
  'SHOPIFY_PARTNER_TOKEN',
42
40
  'SHOPIFY_PARTNER_ORG'
43
41
  ];
42
+ /**
43
+ * Standard variables an earlier version required and this one reads in neither art. The delivery
44
+ * service sets them as long as a product runs on such a version: a product starts with them as
45
+ * without, its .env.example may name them, and none takes one for its own.
46
+ */
47
+ export const RETIRED_VARIABLES = ['HOSTING_LOCATION'];
44
48
  /**
45
49
  * Every variable the baukasten reads in a web app. NODE_ENV comes from the image, and the server sets
46
50
  * ORIGIN from PUBLIC_ORIGIN.
@@ -58,5 +62,10 @@ export const SHOPIFY_VARIABLES = [
58
62
  'SHOPIFY_API_BASE',
59
63
  'SHOPIFY_CLIENT_ID'
60
64
  ];
61
- /** Every variable the baukasten reads in a product of either art: no product takes one for its own. */
62
- export const BAUKASTEN_VARIABLES = [...new Set([...WEBAPP_VARIABLES, ...SHOPIFY_VARIABLES])];
65
+ /**
66
+ * Every variable the baukasten reads in a product of either art, and those it no longer reads: no
67
+ * product takes one for its own.
68
+ */
69
+ export const BAUKASTEN_VARIABLES = [
70
+ ...new Set([...WEBAPP_VARIABLES, ...SHOPIFY_VARIABLES, ...RETIRED_VARIABLES])
71
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tollwyn/baukasten",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "What every product built on this kit shares: configuration, log and server, database with two-layer migrations, health, accounts with sessions and API keys, limits, mail, payment through Stripe, the numbers for sales, the frame and pages, the stubs that hang them into a product and the check of a product, and the tools to test one, its connection test among them; and for a Shopify app its installation with tokens, the frame of the admin, its webhooks, its plan through the Partner API and its privacy text.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -46,7 +46,7 @@
46
46
  "scripts": {
47
47
  "build": "svelte-package --input src/lib --output dist",
48
48
  "prepack": "npm run build",
49
- "muster": "npm run build && npm --prefix muster ci --no-audit --no-fund && npm --prefix muster-shopify ci --no-audit --no-fund",
49
+ "muster": "npm run build && node scripts/muster-lockfiles.ts && npm --prefix muster ci --no-audit --no-fund && npm --prefix muster-shopify ci --no-audit --no-fund",
50
50
  "test": "vitest run && npm --prefix muster test && npm --prefix muster-shopify test",
51
51
  "test:watch": "vitest",
52
52
  "test:db": "node ../scripts/test-db.mjs mit vitest run --config vitest.db.config.ts",