@o3co/create-auth-provider 0.17.0-rc.4 → 0.18.0-rc.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.
Files changed (110) hide show
  1. package/README.md +2 -198
  2. package/main.js +4 -0
  3. package/package.json +8 -30
  4. package/README.ja.md +0 -200
  5. package/dist/cli.d.mts +0 -3
  6. package/dist/cli.d.mts.map +0 -1
  7. package/dist/cli.mjs +0 -18
  8. package/dist/index.d.mts +0 -48
  9. package/dist/index.d.mts.map +0 -1
  10. package/dist/index.mjs +0 -325
  11. package/dist/internal/template-filter.d.mts +0 -14
  12. package/dist/internal/template-filter.d.mts.map +0 -1
  13. package/dist/internal/template-filter.mjs +0 -42
  14. package/templates/standalone/.dockerignore +0 -23
  15. package/templates/standalone/.env.example +0 -152
  16. package/templates/standalone/Dockerfile +0 -125
  17. package/templates/standalone/Makefile +0 -12
  18. package/templates/standalone/README.ja.md +0 -913
  19. package/templates/standalone/README.md +0 -1537
  20. package/templates/standalone/config/application.conf +0 -351
  21. package/templates/standalone/config/clients.yaml +0 -4
  22. package/templates/standalone/config/clients.yaml.example +0 -118
  23. package/templates/standalone/config/development.conf +0 -17
  24. package/templates/standalone/config/mailpit.conf +0 -13
  25. package/templates/standalone/config/production.conf +0 -15
  26. package/templates/standalone/config/reference.conf +0 -424
  27. package/templates/standalone/docker-compose.mailpit.yml +0 -39
  28. package/templates/standalone/docker-compose.production.yml +0 -229
  29. package/templates/standalone/docker-compose.test.yml +0 -16
  30. package/templates/standalone/docker-compose.yml +0 -67
  31. package/templates/standalone/gitignore +0 -23
  32. package/templates/standalone/package.json +0 -55
  33. package/templates/standalone/src/__tests__/adapters.test.mts +0 -425
  34. package/templates/standalone/src/__tests__/admission-lifecycle.test.mts +0 -87
  35. package/templates/standalone/src/__tests__/all-modules-composition.fixture.mts +0 -1192
  36. package/templates/standalone/src/__tests__/all-modules-composition.multi.test.mts +0 -285
  37. package/templates/standalone/src/__tests__/all-modules-composition.test.mts +0 -1154
  38. package/templates/standalone/src/__tests__/audit-sink.test.mts +0 -346
  39. package/templates/standalone/src/__tests__/config-notices.test.mts +0 -157
  40. package/templates/standalone/src/__tests__/configPath.test.mts +0 -69
  41. package/templates/standalone/src/__tests__/configured-mfa-mode.fixture.mts +0 -48
  42. package/templates/standalone/src/__tests__/core-federations.test.mts +0 -252
  43. package/templates/standalone/src/__tests__/core-sections.test.mts +0 -192
  44. package/templates/standalone/src/__tests__/device-code-store-client-module.test.mts +0 -95
  45. package/templates/standalone/src/__tests__/documented-env-overrides.test.mts +0 -1290
  46. package/templates/standalone/src/__tests__/federation-grants-composition.test.mts +0 -784
  47. package/templates/standalone/src/__tests__/federation-grants-survive-logout.test.mts +0 -461
  48. package/templates/standalone/src/__tests__/federation-token-refresh-outage.test.mts +0 -141
  49. package/templates/standalone/src/__tests__/federation-types.test.mts +0 -239
  50. package/templates/standalone/src/__tests__/google-session.fixture.mts +0 -308
  51. package/templates/standalone/src/__tests__/host-routes.test.mts +0 -134
  52. package/templates/standalone/src/__tests__/library-reference-resolution.smoke.test.mts +0 -29
  53. package/templates/standalone/src/__tests__/library-references.fixture.mts +0 -188
  54. package/templates/standalone/src/__tests__/lifecycle-pending-close.test.mts +0 -216
  55. package/templates/standalone/src/__tests__/listen.test.mts +0 -121
  56. package/templates/standalone/src/__tests__/logger-projection.test.mts +0 -77
  57. package/templates/standalone/src/__tests__/logout-session-cookie.test.mts +0 -113
  58. package/templates/standalone/src/__tests__/mail-sender.test.mts +0 -134
  59. package/templates/standalone/src/__tests__/mailpit-compose.test.mts +0 -393
  60. package/templates/standalone/src/__tests__/metrics.test.mts +0 -253
  61. package/templates/standalone/src/__tests__/mfa-routes-budget.test.mts +0 -122
  62. package/templates/standalone/src/__tests__/mfa-switch.redis.test.mts +0 -127
  63. package/templates/standalone/src/__tests__/mfa-switch.test.mts +0 -883
  64. package/templates/standalone/src/__tests__/own-modules.test.mts +0 -1512
  65. package/templates/standalone/src/__tests__/post-logout-redirect.test.mts +0 -183
  66. package/templates/standalone/src/__tests__/redis-assume-noeviction.test.mts +0 -214
  67. package/templates/standalone/src/__tests__/redis-connection-error-log.test.mts +0 -135
  68. package/templates/standalone/src/__tests__/redis-rate-limiter-config-survives.test.mts +0 -214
  69. package/templates/standalone/src/__tests__/refresh-token-family-client-module.test.mts +0 -249
  70. package/templates/standalone/src/__tests__/replica-safety.test.mts +0 -654
  71. package/templates/standalone/src/__tests__/repositories-logger.test.mts +0 -119
  72. package/templates/standalone/src/__tests__/router-error-answers.test.mts +0 -146
  73. package/templates/standalone/src/__tests__/scaffold-assets.test.mts +0 -610
  74. package/templates/standalone/src/__tests__/sections.test.mts +0 -504
  75. package/templates/standalone/src/__tests__/session-lifecycle.test.mts +0 -215
  76. package/templates/standalone/src/__tests__/session-logout-invalidates-token.test.mts +0 -296
  77. package/templates/standalone/src/__tests__/session-logout-lifecycle.test.mts +0 -130
  78. package/templates/standalone/src/__tests__/session-requirements.test.mts +0 -382
  79. package/templates/standalone/src/__tests__/shipped-config-notices.test.mts +0 -274
  80. package/templates/standalone/src/__tests__/shutdown.test.mts +0 -622
  81. package/templates/standalone/src/__tests__/smoke.test.mts +0 -634
  82. package/templates/standalone/src/__tests__/startup-log-lines.test.mts +0 -148
  83. package/templates/standalone/src/__tests__/store-credential.test.mts +0 -312
  84. package/templates/standalone/src/__tests__/supertest-loopback.test.mts +0 -296
  85. package/templates/standalone/src/__tests__/three-tier-resolution.test.mts +0 -265
  86. package/templates/standalone/src/__tests__/two-phase-config.test.mts +0 -605
  87. package/templates/standalone/src/__tests__/upstream-amr.acceptance.test.mts +0 -382
  88. package/templates/standalone/src/adapters.mts +0 -162
  89. package/templates/standalone/src/app.mts +0 -136
  90. package/templates/standalone/src/bootRefusal.mts +0 -117
  91. package/templates/standalone/src/buildModules.mts +0 -358
  92. package/templates/standalone/src/configPath.mts +0 -487
  93. package/templates/standalone/src/listen.mts +0 -60
  94. package/templates/standalone/src/logger.mts +0 -80
  95. package/templates/standalone/src/metrics.mts +0 -167
  96. package/templates/standalone/src/mfaSwitch.mts +0 -284
  97. package/templates/standalone/src/modules.mts +0 -705
  98. package/templates/standalone/src/rootRenames.mts +0 -95
  99. package/templates/standalone/src/routes.mts +0 -89
  100. package/templates/standalone/src/sections.mts +0 -377
  101. package/templates/standalone/src/shutdown.mts +0 -213
  102. package/templates/standalone/tests/Makefile +0 -5
  103. package/templates/standalone/tests/index.test.js +0 -283
  104. package/templates/standalone/tests/package-lock.json +0 -1617
  105. package/templates/standalone/tests/package.json +0 -16
  106. package/templates/standalone/tests/vitest.config.mjs +0 -26
  107. package/templates/standalone/tsconfig.json +0 -31
  108. package/templates/standalone/vitest.config.mts +0 -31
  109. package/templates/standalone/vitest.supertest-loopback.mts +0 -278
  110. package/templates/versions.json +0 -20
@@ -1,125 +0,0 @@
1
- # The base image is pinned by digest, not just by tag: `node:26-alpine` is a
2
- # moving pointer, so the same source produced a different image on every
3
- # rebuild (#289). The digest is the multi-arch index, so amd64 and arm64 both
4
- # resolve from it. Dependabot's `docker` ecosystem keeps the pair in step —
5
- # bump the tag and the digest together, never the tag alone.
6
- FROM node:26-alpine@sha256:0b36e8c136b94cd4fcf02188228e76c31ad5872eef3fec8cbd2eee500cfd9e80 AS node-base
7
-
8
- ENV HOME=/home/node
9
-
10
- # corepack is pinned too. `npm install -g corepack --force` resolved whatever
11
- # was latest at build time, which is a mutable dependency of every build. The
12
- # pnpm version itself comes from the `packageManager` field in package.json,
13
- # which corepack reads.
14
- RUN apk add --no-cache tini \
15
- && npm install -g corepack@0.35.0 --force \
16
- && corepack enable
17
-
18
- WORKDIR /home/node
19
-
20
- #############################################
21
- FROM node-base AS deps
22
-
23
- # pnpm-lock.yaml is a required build input: `create-auth-provider` generates
24
- # it at scaffold time and the project commits it. Without it this COPY fails,
25
- # which is the intended outcome — a build that silently re-resolves every
26
- # dependency range is the thing this file stopped doing (#289).
27
- #
28
- # pnpm-workspace.yaml is required for the same reason and was missing (#407):
29
- # the scaffolder generates it to carry bcrypt's `onlyBuiltDependencies`
30
- # allowlist, and pnpm >= 10.29 reads that setting ONLY from this file, in
31
- # single-package projects too (#360). Installing without it runs
32
- # allowlist-less, so pnpm silently skips bcrypt's build hook — which costs
33
- # nothing while an alpine prebuild exists, and re-creates #360 the day one
34
- # is missing and the native addon has to compile.
35
- COPY --chown=node:node package.json pnpm-lock.yaml pnpm-workspace.yaml ./
36
-
37
- USER node
38
-
39
- # --frozen-lockfile: install exactly what the lockfile pins, and fail if
40
- # package.json and the lockfile disagree, rather than quietly rewriting it.
41
- RUN pnpm install --frozen-lockfile
42
-
43
- #############################################
44
- FROM deps AS builder
45
-
46
- # USER node inherited from deps stage; repeated here to make the builder
47
- # hardening invariant obvious in Dockerfile reviews.
48
- USER node
49
-
50
- COPY --chown=node:node tsconfig.json ./
51
- # What `.dockerignore` lets through (#705): the committed configuration layers
52
- # and the example, never `clients.yaml` or a key. The runtime image copies
53
- # this directory, so anything per-deployment here would be baked into it; the
54
- # production compose mounts the client registry instead.
55
- COPY --chown=node:node config/ ./config/
56
- COPY --chown=node:node src/ ./src/
57
-
58
- RUN pnpm run build
59
-
60
- #############################################
61
- # Dependencies are resolved once, in `deps`. This stage drops the dev half of
62
- # that same tree instead of running a second `pnpm install --prod` in the
63
- # runtime stage: a second install is a second resolution, and therefore a
64
- # second chance for the runtime image to hold something the build never saw.
65
- FROM deps AS prod-deps
66
-
67
- USER node
68
-
69
- RUN pnpm prune --prod
70
-
71
- #############################################
72
- FROM node-base AS runtime
73
-
74
- ENV NODE_ENV=production
75
-
76
- COPY --from=deps /home/node/package.json /home/node/pnpm-lock.yaml ./
77
- COPY --from=prod-deps /home/node/node_modules/ ./node_modules/
78
- COPY --from=builder /home/node/dist/ ./dist/
79
- COPY --from=builder /home/node/config/ ./config/
80
-
81
- USER node
82
-
83
- ENV HTTP_PORT=3000
84
- EXPOSE ${HTTP_PORT}
85
-
86
- # Probes /_healthcheck (liveness), NOT /readyz. Docker has exactly one health
87
- # signal, and on Swarm / ECS / autoheal-style supervisors an unhealthy
88
- # container is stopped and replaced. Pointing it at /readyz would mean a 90s
89
- # Redis failover marks every replica unhealthy and gets them all rescheduled —
90
- # which reconnects nothing and adds cold starts to the incident. Losing Redis
91
- # is a reason to stop routing to a replica, not to kill it.
92
- #
93
- # /readyz is the load-balancer / Kubernetes readinessProbe target; see the
94
- # "Health endpoints" section of README.md. A compose file that genuinely wants
95
- # `depends_on: condition: service_healthy` to mean "ready" can override this
96
- # per-service, which keeps the restart-driving signal out of it.
97
- #
98
- # Use the shell form so ${HTTP_PORT} expands at probe time. The HOCON
99
- # config reads `${?HTTP_PORT}` for `http.port`, so the listener and the
100
- # probe stay in sync regardless of the operator's port choice.
101
- HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
102
- CMD wget -q -O /dev/null "http://localhost:${HTTP_PORT}/_healthcheck" || exit 1
103
-
104
- ENTRYPOINT ["tini", "--"]
105
- CMD ["node", "dist/app.mjs"]
106
-
107
- #############################################
108
- FROM builder AS test
109
-
110
- COPY --chown=node:node vitest.config.mts vitest.supertest-loopback.mts ./
111
- COPY --chown=node:node tests/ ./tests/
112
- # #512: the suite reads these from the project root (scaffold-assets,
113
- # documented-env-overrides, smoke). The builder stage brings only what the
114
- # build needs, so inside this image they did not exist and `make test` failed
115
- # on files that were never a test's business. `.dockerignore` lets them into
116
- # the context for the same reason; nothing copies them into `runtime`.
117
- COPY --chown=node:node Dockerfile .dockerignore .env.example .gitignore README.md README.ja.md \
118
- docker-compose.yml docker-compose.production.yml docker-compose.mailpit.yml ./
119
-
120
- CMD ["pnpm", "run", "test", "--", "--passWithNoTests"]
121
-
122
- #############################################
123
- FROM builder AS develop
124
-
125
- CMD ["pnpm", "run", "debug"]
@@ -1,12 +0,0 @@
1
- IMAGE ?= auth-provider
2
-
3
- .PHONY: dev test build
4
-
5
- dev:
6
- docker compose up --build
7
-
8
- test:
9
- docker compose -f docker-compose.test.yml up --build --abort-on-container-exit --exit-code-from test
10
-
11
- build:
12
- docker build --target runtime -t $(IMAGE) .