create-hollware 0.9.1 → 0.11.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/dist/index.mjs
CHANGED
|
@@ -17,6 +17,10 @@ const USAGE = [
|
|
|
17
17
|
" --site <key> The key of your site, such as my-site; it never changes (default: my-site)",
|
|
18
18
|
" --preset <name> What the site starts with: blog, docs or empty (default: blog)",
|
|
19
19
|
" --locales <list> Its locales, comma-separated, the first the default (default: en)",
|
|
20
|
+
" --ip-addresses <off|hashed>",
|
|
21
|
+
" Whether the activity log keeps a keyed hash of each address (default: off)",
|
|
22
|
+
" --audit-retention-days <n>",
|
|
23
|
+
" Days each line of the activity log is kept, 30 to 3650 (default: forever)",
|
|
20
24
|
" --pm <npm|pnpm> The package manager that installs (default: npm)",
|
|
21
25
|
" --yes Take the defaults: <dir> is my-hollware when it is not given",
|
|
22
26
|
" --no-install Do not install, migrate or make the site",
|
|
@@ -51,6 +55,8 @@ function readChoices(argv) {
|
|
|
51
55
|
site: { type: "string" },
|
|
52
56
|
preset: { type: "string" },
|
|
53
57
|
locales: { type: "string" },
|
|
58
|
+
"ip-addresses": { type: "string" },
|
|
59
|
+
"audit-retention-days": { type: "string" },
|
|
54
60
|
pm: { type: "string" },
|
|
55
61
|
yes: { type: "boolean" },
|
|
56
62
|
"no-install": { type: "boolean" },
|
|
@@ -78,7 +84,12 @@ function readChoices(argv) {
|
|
|
78
84
|
pm,
|
|
79
85
|
install: values["no-install"] !== true,
|
|
80
86
|
git: values["no-git"] !== true,
|
|
81
|
-
initFlags: [
|
|
87
|
+
initFlags: [
|
|
88
|
+
...values.preset === void 0 ? [] : ["--preset", values.preset],
|
|
89
|
+
...values.locales === void 0 ? [] : ["--locales", values.locales],
|
|
90
|
+
...values["ip-addresses"] === void 0 ? [] : ["--ip-addresses", values["ip-addresses"]],
|
|
91
|
+
...values["audit-retention-days"] === void 0 ? [] : ["--audit-retention-days", values["audit-retention-days"]]
|
|
92
|
+
]
|
|
82
93
|
};
|
|
83
94
|
}
|
|
84
95
|
function replaceIn(path, replacements) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-hollware",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Create a new Hollware project.",
|
|
5
5
|
"homepage": "https://hollware.com",
|
|
6
6
|
"bugs": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/node": "24.19.2",
|
|
36
36
|
"publint": "0.3.25",
|
|
37
37
|
"typescript": "7.0.2",
|
|
38
|
-
"vite-plus": "1.
|
|
38
|
+
"vite-plus": "1.2.0"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=24.11.0"
|
package/template/package.json
CHANGED
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@hollware/core": "HOLLWARE_VERSION",
|
|
17
17
|
"@hollware/server": "HOLLWARE_VERSION",
|
|
18
|
-
"zod": "4.6.
|
|
18
|
+
"zod": "4.6.7"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@cloudflare/vite-plugin": "1.
|
|
22
|
-
"@cloudflare/vitest-plugin": "1.4.
|
|
21
|
+
"@cloudflare/vite-plugin": "1.64.0",
|
|
22
|
+
"@cloudflare/vitest-plugin": "1.4.3",
|
|
23
23
|
"@hollware/admin": "HOLLWARE_VERSION",
|
|
24
24
|
"hollware": "HOLLWARE_VERSION",
|
|
25
25
|
"typescript": "7.0.2",
|
|
26
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@1.
|
|
27
|
-
"vite-plus": "1.
|
|
28
|
-
"vitest": "5.0.
|
|
29
|
-
"wrangler": "4.
|
|
26
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.2.0",
|
|
27
|
+
"vite-plus": "1.2.0",
|
|
28
|
+
"vitest": "5.0.4",
|
|
29
|
+
"wrangler": "4.151.0"
|
|
30
30
|
},
|
|
31
31
|
"overrides": {
|
|
32
32
|
"vite": "$vite"
|
|
@@ -31,8 +31,8 @@ export default defineConfig({
|
|
|
31
31
|
name: 'starter:workerd',
|
|
32
32
|
include: ['test/**/*.workerd.test.ts'],
|
|
33
33
|
setupFiles: ['test/apply-migrations.ts'],
|
|
34
|
-
//
|
|
35
|
-
//
|
|
34
|
+
// Off: @cloudflare/vitest-plugin reads Vitest's module cache from workerd since 1.4.3
|
|
35
|
+
// (cloudflare/workers-sdk#15618), but it saved no time here (server:workerd, 13 s either way).
|
|
36
36
|
fsModuleCache: false,
|
|
37
37
|
},
|
|
38
38
|
})
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// Generated by Wrangler by running `wrangler types` (hash:
|
|
3
|
-
// Runtime types generated with workerd@1.
|
|
2
|
+
// Generated by Wrangler by running `wrangler types` (hash: 8cce72e181db11068cbc639f31cd25a2)
|
|
3
|
+
// Runtime types generated with workerd@1.20261012.1 2026-10-06 global_fetch_strictly_public,no_nodejs_compat,no_nodejs_compat_v2
|
|
4
4
|
interface __BaseEnv_Env {
|
|
5
5
|
OAUTH_KV: KVNamespace;
|
|
6
6
|
DB: D1Database;
|
|
7
7
|
EVENTS: Queue;
|
|
8
|
+
HOLLWARE_RATE_LIMIT: RateLimit;
|
|
8
9
|
ASSETS: Fetcher;
|
|
9
10
|
HOLLWARE_PUBLIC_URL: "http://localhost:5199";
|
|
10
11
|
}
|
|
@@ -3323,13 +3324,7 @@ declare abstract class SqlStorageStatement {
|
|
|
3323
3324
|
}
|
|
3324
3325
|
type SqlStorageValue = ArrayBuffer | string | number | null;
|
|
3325
3326
|
declare abstract class SqlStorageCursor<T extends Record<string, SqlStorageValue>> {
|
|
3326
|
-
next():
|
|
3327
|
-
done?: false;
|
|
3328
|
-
value: T;
|
|
3329
|
-
} | {
|
|
3330
|
-
done: true;
|
|
3331
|
-
value?: never;
|
|
3332
|
-
};
|
|
3327
|
+
next(): IteratorResult<T, undefined>;
|
|
3333
3328
|
toArray(): T[];
|
|
3334
3329
|
one(): T;
|
|
3335
3330
|
raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
|
|
@@ -3655,6 +3650,7 @@ interface Tracing {
|
|
|
3655
3650
|
}
|
|
3656
3651
|
declare abstract class Span {
|
|
3657
3652
|
get isTraced(): boolean;
|
|
3653
|
+
spanContext(): TracingSpanContext;
|
|
3658
3654
|
setAttribute(key: string, value: boolean | number | string): this;
|
|
3659
3655
|
setAttributes(attributes: Record<string, boolean | number | string | undefined>): this;
|
|
3660
3656
|
recordException(exception: string | {
|
|
@@ -3682,6 +3678,11 @@ interface TracingSpanStatus {
|
|
|
3682
3678
|
code: TracingSpanStatusCode;
|
|
3683
3679
|
message?: string;
|
|
3684
3680
|
}
|
|
3681
|
+
interface TracingSpanContext {
|
|
3682
|
+
traceId: string;
|
|
3683
|
+
spanId: string;
|
|
3684
|
+
traceFlags: number;
|
|
3685
|
+
}
|
|
3685
3686
|
/**
|
|
3686
3687
|
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
3687
3688
|
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
@@ -13238,20 +13239,30 @@ interface Disposable {
|
|
|
13238
13239
|
}
|
|
13239
13240
|
declare module 'cloudflare:durable-objects' {
|
|
13240
13241
|
/**
|
|
13241
|
-
* Marks
|
|
13242
|
-
* to
|
|
13242
|
+
* Marks Durable Object methods as safe to run more than once. The runtime may then retry calls
|
|
13243
|
+
* to them after a disconnect that might have happened after the method started. It does not
|
|
13243
13244
|
* enable retries or change how many are made.
|
|
13244
13245
|
*
|
|
13246
|
+
* Mark methods on the class prototype, for example from a static block:
|
|
13247
|
+
*
|
|
13248
|
+
* ```ts
|
|
13249
|
+
* class Counter extends DurableObject {
|
|
13250
|
+
* static {
|
|
13251
|
+
* retryable(this.prototype.reset);
|
|
13252
|
+
* }
|
|
13253
|
+
* async reset() {}
|
|
13254
|
+
* }
|
|
13255
|
+
* ```
|
|
13256
|
+
*
|
|
13257
|
+
* The mark is on the function itself. A subclass inherits it, but an override, a bound copy, or
|
|
13258
|
+
* a wrapper is not marked unless it is also passed to `retryable()`.
|
|
13259
|
+
*
|
|
13245
13260
|
* Each attempt creates its own return value, so if the method returns an `RpcTarget`, its
|
|
13246
13261
|
* `[Symbol.dispose]()` may run once per attempt.
|
|
13247
13262
|
*
|
|
13248
|
-
*
|
|
13249
|
-
* outermost (first in source order) so it marks the method that is finally installed.
|
|
13250
|
-
* Otherwise `@retryable` has no effect, and constructing the object logs a warning.
|
|
13251
|
-
* Requires standard (not `experimentalDecorators`) decorators and a bundler that transforms
|
|
13252
|
-
* them, such as Wrangler.
|
|
13263
|
+
* @throws TypeError if an argument is not a function.
|
|
13253
13264
|
*/
|
|
13254
|
-
export function retryable
|
|
13265
|
+
export function retryable(...methods: ((...args: never[]) => unknown)[]): void;
|
|
13255
13266
|
}
|
|
13256
13267
|
/**
|
|
13257
13268
|
* The returned data after sending an email
|
|
@@ -13393,7 +13404,10 @@ declare module "cloudflare:email" {
|
|
|
13393
13404
|
* Evaluation context for targeting rules.
|
|
13394
13405
|
* Keys are attribute names (e.g. "userId", "country"), values are the attribute values.
|
|
13395
13406
|
*/
|
|
13396
|
-
type
|
|
13407
|
+
type FlagshipEvaluationContextValue = string | number | boolean | null | FlagshipEvaluationContextValue[] | {
|
|
13408
|
+
[key: string]: FlagshipEvaluationContextValue;
|
|
13409
|
+
};
|
|
13410
|
+
type FlagshipEvaluationContext = Record<string, FlagshipEvaluationContextValue>;
|
|
13397
13411
|
interface FlagshipEvaluationDetails<T> {
|
|
13398
13412
|
flagKey: string;
|
|
13399
13413
|
value: T;
|
|
@@ -13402,6 +13416,7 @@ interface FlagshipEvaluationDetails<T> {
|
|
|
13402
13416
|
errorCode?: string | undefined;
|
|
13403
13417
|
errorMessage?: string | undefined;
|
|
13404
13418
|
}
|
|
13419
|
+
type FlagshipWidenedValue<T> = T extends boolean ? boolean : T extends string ? string : T extends number ? number : T;
|
|
13405
13420
|
interface FlagshipEvaluationError extends Error {
|
|
13406
13421
|
}
|
|
13407
13422
|
/**
|
|
@@ -13429,8 +13444,23 @@ declare abstract class Flagship {
|
|
|
13429
13444
|
* @param flagKey The key of the flag to evaluate.
|
|
13430
13445
|
* @param defaultValue Optional default value returned when evaluation fails.
|
|
13431
13446
|
* @param context Optional evaluation context for targeting rules.
|
|
13447
|
+
* @deprecated Use getValue() instead.
|
|
13432
13448
|
*/
|
|
13433
13449
|
get(flagKey: string, defaultValue?: unknown, context?: FlagshipEvaluationContext): Promise<unknown>;
|
|
13450
|
+
/**
|
|
13451
|
+
* Get a flag value, inferring its expected type from the default value.
|
|
13452
|
+
* @param flagKey The key of the flag to evaluate.
|
|
13453
|
+
* @param defaultValue Default value returned when evaluation fails or the flag type does not match.
|
|
13454
|
+
* @param context Optional evaluation context for targeting rules.
|
|
13455
|
+
*/
|
|
13456
|
+
getValue<T extends boolean | string | number | Record<string, unknown> | unknown[]>(flagKey: string, defaultValue: T, context?: FlagshipEvaluationContext): Promise<FlagshipWidenedValue<T>>;
|
|
13457
|
+
/**
|
|
13458
|
+
* Get a flag value with full evaluation details, inferring its expected type from the default value.
|
|
13459
|
+
* @param flagKey The key of the flag to evaluate.
|
|
13460
|
+
* @param defaultValue Default value returned when evaluation fails or the flag type does not match.
|
|
13461
|
+
* @param context Optional evaluation context for targeting rules.
|
|
13462
|
+
*/
|
|
13463
|
+
getDetails<T extends boolean | string | number | Record<string, unknown> | unknown[]>(flagKey: string, defaultValue: T, context?: FlagshipEvaluationContext): Promise<FlagshipEvaluationDetails<FlagshipWidenedValue<T>>>;
|
|
13434
13464
|
/**
|
|
13435
13465
|
* Get a boolean flag value.
|
|
13436
13466
|
* @param flagKey The key of the flag to evaluate.
|
|
@@ -14231,7 +14261,7 @@ declare namespace Rpc {
|
|
|
14231
14261
|
// Structured cloneables
|
|
14232
14262
|
BaseType
|
|
14233
14263
|
// Structured cloneable composites
|
|
14234
|
-
| Map<T extends Map<infer U, unknown> ? Serializable<U> : never, T extends Map<unknown, infer U> ? Serializable<U> : never> | Set<T extends Set<infer U> ? Serializable<U> : never> | ReadonlyArray<T extends ReadonlyArray<infer U> ? Serializable<U> : never> | {
|
|
14264
|
+
| Map<T extends Map<infer U, unknown> ? Serializable<U> : never, T extends Map<unknown, infer U> ? Serializable<U> : never> | Set<T extends Set<infer U> ? Serializable<U> : never> | ReadonlyMap<T extends ReadonlyMap<infer U, unknown> ? Serializable<U> : never, T extends ReadonlyMap<unknown, infer U> ? Serializable<U> : never> | ReadonlySet<T extends ReadonlySet<infer U> ? Serializable<U> : never> | ReadonlyArray<T extends ReadonlyArray<infer U> ? Serializable<U> : never> | {
|
|
14235
14265
|
[K in keyof T]: K extends number | string ? Serializable<T[K]> : never;
|
|
14236
14266
|
}
|
|
14237
14267
|
// Special types
|
|
@@ -14249,7 +14279,7 @@ declare namespace Rpc {
|
|
|
14249
14279
|
type BaseType = void | undefined | null | boolean | number | bigint | string | TypedArray | ArrayBuffer | DataView | Date | Error | RegExp | ReadableStream<Uint8Array> | WritableStream<Uint8Array> | Request | Response | Headers;
|
|
14250
14280
|
// Recursively rewrite all `Stubable` types with `Stub`s
|
|
14251
14281
|
// prettier-ignore
|
|
14252
|
-
type Stubify<T> = T extends Stubable ? Stub<T> : T extends Map<infer K, infer V> ? Map<Stubify<K>, Stubify<V>> : T extends Set<infer V> ? Set<Stubify<V>> : T extends Array<infer V> ? Array<Stubify<V>> : T extends ReadonlyArray<infer V> ? ReadonlyArray<Stubify<V>> : T extends BaseType ? T : T extends {
|
|
14282
|
+
type Stubify<T> = T extends Stubable ? Stub<T> : T extends Map<infer K, infer V> ? Map<Stubify<K>, Stubify<V>> : T extends Set<infer V> ? Set<Stubify<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<Stubify<K>, Stubify<V>> : T extends ReadonlySet<infer V> ? ReadonlySet<Stubify<V>> : T extends Array<infer V> ? Array<Stubify<V>> : T extends ReadonlyArray<infer V> ? ReadonlyArray<Stubify<V>> : T extends BaseType ? T : T extends {
|
|
14253
14283
|
[key: string | number]: any;
|
|
14254
14284
|
} ? {
|
|
14255
14285
|
[K in keyof T]: Stubify<T[K]>;
|
|
@@ -14258,7 +14288,7 @@ declare namespace Rpc {
|
|
|
14258
14288
|
// Note we use `StubBase` instead of `Stub` here to avoid circular dependencies:
|
|
14259
14289
|
// `Stub` depends on `Provider`, which depends on `Unstubify`, which would depend on `Stub`.
|
|
14260
14290
|
// prettier-ignore
|
|
14261
|
-
type Unstubify<T> = T extends StubBase<infer V> ? V : T extends Map<infer K, infer V> ? Map<Unstubify<K>, Unstubify<V>> : T extends Set<infer V> ? Set<Unstubify<V>> : T extends Array<infer V> ? Array<Unstubify<V>> : T extends ReadonlyArray<infer V> ? ReadonlyArray<Unstubify<V>> : T extends BaseType ? T : T extends {
|
|
14291
|
+
type Unstubify<T> = T extends StubBase<infer V> ? V : T extends Map<infer K, infer V> ? Map<Unstubify<K>, Unstubify<V>> : T extends Set<infer V> ? Set<Unstubify<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<Unstubify<K>, Unstubify<V>> : T extends ReadonlySet<infer V> ? ReadonlySet<Unstubify<V>> : T extends Array<infer V> ? Array<Unstubify<V>> : T extends ReadonlyArray<infer V> ? ReadonlyArray<Unstubify<V>> : T extends BaseType ? T : T extends {
|
|
14262
14292
|
[key: string | number]: unknown;
|
|
14263
14293
|
} ? {
|
|
14264
14294
|
[K in keyof T]: Unstubify<T[K]>;
|
package/template/wrangler.jsonc
CHANGED
|
@@ -40,6 +40,15 @@
|
|
|
40
40
|
// The OAuth server's clients, grants and tokens (ADR-026). No id: the first `hollware deploy`
|
|
41
41
|
// creates the namespace and writes its id here.
|
|
42
42
|
"kv_namespaces": [{ "binding": "OAUTH_KV" }],
|
|
43
|
+
// Sign-in, OAuth's token endpoint and the beacon take at most 60 requests a minute from one
|
|
44
|
+
// address each: what a person or a site sends never comes near it.
|
|
45
|
+
"ratelimits": [
|
|
46
|
+
{
|
|
47
|
+
"name": "HOLLWARE_RATE_LIMIT",
|
|
48
|
+
"namespace_id": "1001",
|
|
49
|
+
"simple": { "limit": 60, "period": 60 },
|
|
50
|
+
},
|
|
51
|
+
],
|
|
43
52
|
"d1_databases": [
|
|
44
53
|
{
|
|
45
54
|
"binding": "DB",
|