@pikku/schedule 0.12.9 → 0.12.11
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/in-memory-scheduler-service.d.ts +4 -0
- package/dist/in-memory-scheduler-service.js +32 -1
- package/package.json +13 -7
- package/CHANGELOG.md +0 -410
- package/run-tests.sh +0 -68
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CoreUserSession } from '@pikku/core/types';
|
|
2
2
|
import type { ScheduledTaskInfo, ScheduledTaskSummary } from '@pikku/core/services';
|
|
3
|
+
import type { ScheduledTaskRuns } from '@pikku/core/scheduler';
|
|
3
4
|
import { SchedulerService } from '@pikku/core/services';
|
|
4
5
|
/**
|
|
5
6
|
* In-memory SchedulerService implementation.
|
|
@@ -8,6 +9,7 @@ import { SchedulerService } from '@pikku/core/services';
|
|
|
8
9
|
export declare class InMemorySchedulerService extends SchedulerService {
|
|
9
10
|
private cronJobs;
|
|
10
11
|
private delayedTasks;
|
|
12
|
+
private taskRuns;
|
|
11
13
|
private idCounter;
|
|
12
14
|
init(): Promise<void>;
|
|
13
15
|
/**
|
|
@@ -17,6 +19,7 @@ export declare class InMemorySchedulerService extends SchedulerService {
|
|
|
17
19
|
unschedule(taskId: string): Promise<boolean>;
|
|
18
20
|
getTask(taskId: string): Promise<ScheduledTaskInfo | null>;
|
|
19
21
|
getAllTasks(): Promise<ScheduledTaskSummary[]>;
|
|
22
|
+
getTaskRuns(): Promise<Record<string, ScheduledTaskRuns>>;
|
|
20
23
|
close(): Promise<void>;
|
|
21
24
|
/**
|
|
22
25
|
* Start recurring scheduled tasks.
|
|
@@ -27,4 +30,5 @@ export declare class InMemorySchedulerService extends SchedulerService {
|
|
|
27
30
|
*/
|
|
28
31
|
stop(): Promise<void>;
|
|
29
32
|
private startCronJob;
|
|
33
|
+
private recordRun;
|
|
30
34
|
}
|
|
@@ -5,6 +5,7 @@ import { pikkuState, getSingletonServices } from '@pikku/core/state';
|
|
|
5
5
|
import { runScheduledTask } from '@pikku/core/scheduler';
|
|
6
6
|
import { getScheduledTasks } from '@pikku/core/scheduler';
|
|
7
7
|
import { rpcService } from '@pikku/core/rpc';
|
|
8
|
+
const RUN_HISTORY_LIMIT = 50;
|
|
8
9
|
const getLogger = () => {
|
|
9
10
|
return pikkuState(null, 'package', 'singletonServices').logger;
|
|
10
11
|
};
|
|
@@ -15,6 +16,7 @@ const getLogger = () => {
|
|
|
15
16
|
export class InMemorySchedulerService extends SchedulerService {
|
|
16
17
|
cronJobs = new Map();
|
|
17
18
|
delayedTasks = new Map();
|
|
19
|
+
taskRuns = new Map();
|
|
18
20
|
idCounter = 0;
|
|
19
21
|
async init() { }
|
|
20
22
|
/**
|
|
@@ -92,6 +94,18 @@ export class InMemorySchedulerService extends SchedulerService {
|
|
|
92
94
|
scheduledFor: t.scheduledFor,
|
|
93
95
|
}));
|
|
94
96
|
}
|
|
97
|
+
async getTaskRuns() {
|
|
98
|
+
const runs = {};
|
|
99
|
+
for (const [name, job] of this.cronJobs) {
|
|
100
|
+
const history = this.taskRuns.get(name) ?? [];
|
|
101
|
+
runs[name] = {
|
|
102
|
+
nextRun: job.isActive ? job.nextDate().toJSDate() : null,
|
|
103
|
+
lastRun: history[0] ?? null,
|
|
104
|
+
history: [...history],
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
return runs;
|
|
108
|
+
}
|
|
95
109
|
async close() {
|
|
96
110
|
await this.stop();
|
|
97
111
|
// Clear delayed tasks
|
|
@@ -120,15 +134,32 @@ export class InMemorySchedulerService extends SchedulerService {
|
|
|
120
134
|
}
|
|
121
135
|
startCronJob(name, schedule) {
|
|
122
136
|
const job = new CronJob(schedule, async () => {
|
|
137
|
+
const startedAt = new Date();
|
|
123
138
|
try {
|
|
124
139
|
getLogger().info(`Running scheduled task: ${name}`);
|
|
125
140
|
await runScheduledTask({ name });
|
|
126
141
|
getLogger().debug(`Completed scheduled task: ${name}`);
|
|
142
|
+
this.recordRun(name, startedAt, 'completed', null);
|
|
127
143
|
}
|
|
128
144
|
catch (err) {
|
|
129
|
-
|
|
145
|
+
const skipped = err instanceof Error && err.name === 'ScheduledTaskSkippedError';
|
|
146
|
+
this.recordRun(name, startedAt, skipped ? 'skipped' : 'failed', err instanceof Error ? err.message : String(err));
|
|
147
|
+
if (!skipped) {
|
|
148
|
+
getLogger().error(`Scheduled task '${name}' failed: ${err}`);
|
|
149
|
+
}
|
|
130
150
|
}
|
|
131
151
|
}, null, true);
|
|
132
152
|
this.cronJobs.set(name, job);
|
|
133
153
|
}
|
|
154
|
+
recordRun(name, startedAt, status, error) {
|
|
155
|
+
const history = this.taskRuns.get(name) ?? [];
|
|
156
|
+
history.unshift({
|
|
157
|
+
startedAt,
|
|
158
|
+
status,
|
|
159
|
+
durationMs: Date.now() - startedAt.getTime(),
|
|
160
|
+
error,
|
|
161
|
+
});
|
|
162
|
+
history.length = Math.min(history.length, RUN_HISTORY_LIMIT);
|
|
163
|
+
this.taskRuns.set(name, history);
|
|
164
|
+
}
|
|
134
165
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/schedule",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.11",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/pikkujs/pikku.git",
|
|
@@ -16,18 +16,19 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"tsc": "tsc",
|
|
18
18
|
"ncu": "npx npm-check-updates",
|
|
19
|
-
"build": "tsc -b",
|
|
19
|
+
"build": "bun run clean && tsc -b",
|
|
20
20
|
"release": "npm run build && npm test",
|
|
21
21
|
"test": "bash run-tests.sh",
|
|
22
22
|
"test:watch": "bash run-tests.sh --watch",
|
|
23
23
|
"test:coverage": "bash run-tests.sh --coverage",
|
|
24
|
-
"prepublishOnly": "bun run build"
|
|
24
|
+
"prepublishOnly": "bun run build",
|
|
25
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo"
|
|
25
26
|
},
|
|
26
27
|
"peerDependencies": {
|
|
27
|
-
"@pikku/core": "^0.12.
|
|
28
|
+
"@pikku/core": "^0.12.144"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
|
-
"@types/node": "^
|
|
31
|
+
"@types/node": "^26.6.5"
|
|
31
32
|
},
|
|
32
33
|
"engines": {
|
|
33
34
|
"node": ">=24"
|
|
@@ -41,6 +42,11 @@
|
|
|
41
42
|
"types": "./dist/index.d.ts",
|
|
42
43
|
"import": "./dist/index.js",
|
|
43
44
|
"default": "./dist/index.js"
|
|
44
|
-
}
|
|
45
|
-
|
|
45
|
+
},
|
|
46
|
+
"./package.json": "./package.json"
|
|
47
|
+
},
|
|
48
|
+
"files": [
|
|
49
|
+
"dist",
|
|
50
|
+
"!dist/**/*.tsbuildinfo"
|
|
51
|
+
]
|
|
46
52
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,410 +0,0 @@
|
|
|
1
|
-
## 0.12.9
|
|
2
|
-
|
|
3
|
-
### Patch Changes
|
|
4
|
-
|
|
5
|
-
- 15c4968: The default runtime path no longer needs `node:*`, `Buffer` or an unguarded `process`, so it loads on edge runtimes (Web APIs only).
|
|
6
|
-
|
|
7
|
-
**Breaking:** `FileScenarioRunStore`, `scenarioArtifactContentType` and `scenarioRunSummary` leave the `@pikku/core/services` barrel because they use `node:fs`. Import them from `@pikku/core/services/file-scenario-run-store`. Pre-0.13 breaking changes still ship as a patch.
|
|
8
|
-
|
|
9
|
-
**Breaking:** the HMAC helpers in `@pikku/core/hmac` run on Web Crypto, which is async. `hmacSha256Hex`, `hmacDigest`, `verifyHmacSignature` and `verifyPublicKeySignature` now return a Promise; `timingSafeStringEqual` stays synchronous. `WebhookService.sign` and `WebhookService.verify` return a Promise, and so does `verifySlackSignature` in `@pikku/gateway-slack`: `await` them. A function-style `verify` on a webhook source may return a Promise as well. `verifyPublicKeySignature` accepts RSA and EC (P-256, P-384, P-521) PEM keys; Ed25519 and RSA-PSS keys verify as false.
|
|
10
|
-
|
|
11
|
-
`isProduction()` (and the `PIKKU_MODEL_ALIASES` and `PIKKU_ENV` reads) now ask the registered singleton services' `variables` service first, then `process.env` when `process` exists. With neither, `isProduction()` is true, so an edge deployment never exposes error details by accident. `LocalVariablesService` resolves its `process.env` default when constructed and falls back to an empty store without `process`.
|
|
12
|
-
|
|
13
|
-
Workflow invocation ids use a built-in SHA-1 and stay byte-identical. `@pikku/kysely` and the Cloudflare hibernation server use `globalThis.crypto.randomUUID()` and no `Buffer`; `@pikku/kysely` is marked `sideEffects: false`. `@pikku/ai-deepinfra` reads `DEEPINFRA_API_KEY` only when `process` exists and decodes base64 audio without `Buffer`.
|
|
14
|
-
|
|
15
|
-
Runtime tiers. A package declares where it can run in `package.json`: `"pikku": { "runtime": "edge" | "serverless" | "server" }`, with optional per-subpath overrides (`"exports": { "./dev": "server" }`). `server` is the default. `@pikku/core` and the default services are `edge` (core's Node-only subpaths are `server`), `@pikku/better-auth`, `@pikku/addon-admin` and `@pikku/cloudflare` are `serverless` (better-auth statically imports `node:crypto` scrypt), and `@pikku/addon-console` is `server` and must never land in a deployed unit.
|
|
16
|
-
|
|
17
|
-
`pikku deploy` now verifies each deployed unit before bundling it. The unit is bundled with esbuild (neutral platform, `workerd`/`worker`/`browser` conditions) under its tier's profile, ahead of the adapter's aliases and stubs so they cannot hide anything, and the build fails when the bundle holds a package declared above the unit's tier or a Node built-in the runtime does not provide. The error names the unit, package, import chain and the fix. A built-in the provider stubs is a warning. On an edge unit, a bundled `InMemory*` class also fails the build. The unit's tier is its `runtime`, else the project's own `pikku.runtime`, else the provider default (`serverless` on Cloudflare). Packages that declare nothing are judged by their imports only.
|
|
18
|
-
|
|
19
|
-
`ProviderAdapter.getRuntimeProfile(tier?)` returns the compat date, compat flags, the built-ins the runtime provides (keyed by compat date), the stubbed ones and the externals. The Cloudflare adapter derives `wrangler.toml`, the upload metadata and the bundle externals from it; `node:os` and `node:fs` are not provided before compat date 2025-09-15. The default is `nodejs_compat_v2` with compat date 2024-12-18, which is what `wrangler.toml` and Fabric's live workers already use, so Fabric deploys see no runtime change. Only the direct-API upload in `@pikku/deploy-cloudflare` (`createWorker`, used by its own `deploy()`) moves: it sent `nodejs_compat` with 2024-01-01 before. A newer date or flag is opt-in through the adapter option `new CloudflareProviderAdapter({ compatDate })` or `getCloudflareRuntimeProfile(tier, compatDate)`. From 2025-08-15 `node:http` and `node:https` exist, and from 2025-09-15 `node:os`, `node:fs` (stubbed by the build regardless) and `node:perf_hooks`; the verifier's allowed built-ins follow the effective date. A newer date changes the runtime of every worker deployed with it.
|
|
20
|
-
|
|
21
|
-
`declareScopes(['pikku:console'])` (from `@pikku/core/scope`) declares scopes by id without wiring anything. `wireAddon({ scopes })` only requires a scope of an addon's functions; the tree arrives with the addon's metadata, so a role granting `pikku:console` used to fail PKU124 unless the addon was wired, and a wired `@pikku/addon-console` lands in every unit carrying the `/rpc` catch-all. An app that grants the scope without the console now calls `declareScopes` and no longer needs the scaffold or the addon. When the addon is wired its tree and descriptions win and the bare id adds nothing.
|
|
22
|
-
|
|
23
|
-
More packages declare a tier after bundling each with the edge profile. `edge`: `@pikku/addon-graph`, `@pikku/pino`, `@pikku/jose`, `@pikku/ai-vercel`, `@pikku/ai-voice`. `serverless`: `@pikku/kysely-postgres` (postgres.js needs `node:buffer`, `stream`, `events`), `@pikku/backblaze` (`copyFile` reads a local file, which the build stubs), `@pikku/gateway-slack` (`@slack/web-api` imports `node:os` and `zlib`). `server`: `@pikku/schedule` (`cron` imports `child_process`), `@pikku/aws-services` (the AWS SDK's Node handler needs `node:http2`), `@pikku/browser` (puppeteer), and `@pikku/modelcontextprotocol` except its `./fetch` subpath, which is `edge`.
|
|
24
|
-
|
|
25
|
-
`@pikku/addon-graph` no longer needs `node:crypto` or `Buffer`: the Crypto function hashes and HMACs on Web Crypto (MD5 is built in, since Web Crypto has none) and encodes with `TextEncoder`/`atob`/`btoa`, with output unchanged.
|
|
26
|
-
|
|
27
|
-
- Updated dependencies [6f11bb5]
|
|
28
|
-
- Updated dependencies [0c67e33]
|
|
29
|
-
- Updated dependencies [15c4968]
|
|
30
|
-
- Updated dependencies [d75a23d]
|
|
31
|
-
- Updated dependencies [9b12c8a]
|
|
32
|
-
- @pikku/core@0.12.138
|
|
33
|
-
|
|
34
|
-
## 0.12.8
|
|
35
|
-
|
|
36
|
-
### Patch Changes
|
|
37
|
-
|
|
38
|
-
- 4c7a1b5: Run the monorepo's own scripts through bun instead of yarn. What moves is the
|
|
39
|
-
package manager each package's `prepublishOnly` and build scripts invoke, plus
|
|
40
|
-
the two manifest fixes bun needs to resolve the tree: `uWebSockets.js` is
|
|
41
|
-
declared with an explicit `github:` specifier, and `@pikku/uws-handler` marks
|
|
42
|
-
its `uWebSockets.js` peer optional so a bun install of a consumer that brings
|
|
43
|
-
its own uWS app does not try to fetch it from the registry.
|
|
44
|
-
|
|
45
|
-
Three published behaviours change, all of them cases where an isolated
|
|
46
|
-
`node_modules` or bun as the runtime had been papered over by yarn's hoisting:
|
|
47
|
-
|
|
48
|
-
- `@pikku/migrator-sql` turns foreign keys on when it opens a sqlite database
|
|
49
|
-
through bun. `node:sqlite` enforces them by default and `bun:sqlite` does not,
|
|
50
|
-
which silently turned every `ON DELETE CASCADE` into a no-op under
|
|
51
|
-
`bunx --bun pikku`.
|
|
52
|
-
- `@pikku/cli` resolves a deploy provider against the project being deployed
|
|
53
|
-
rather than against wherever the CLI itself is installed, which is what its
|
|
54
|
-
own "is not installed" error asks the user to arrange.
|
|
55
|
-
- `@pikku/cli` treats a specifier a runtime hands straight back — bun does this
|
|
56
|
-
for the modules it implements itself — as not resolved from the project, so
|
|
57
|
-
it falls back rather than loading the runtime's own copy.
|
|
58
|
-
|
|
59
|
-
- Updated dependencies [4c7a1b5]
|
|
60
|
-
- @pikku/core@0.12.108
|
|
61
|
-
|
|
62
|
-
## 0.12.7
|
|
63
|
-
|
|
64
|
-
### Patch Changes
|
|
65
|
-
|
|
66
|
-
- 266e3bc: One door per name: `@pikku/core/ecosystem/*` and the package root are gone
|
|
67
|
-
|
|
68
|
-
`@pikku/core` published every module twice. `ecosystem/http` re-exported
|
|
69
|
-
`./http`, `ecosystem/services` re-exported `./services`, and a name was
|
|
70
|
-
reachable through either — so every addition had to be made in two places, and a
|
|
71
|
-
consumer's import said nothing about what it actually used. The package root was
|
|
72
|
-
the same problem at a larger scale: a single barrel of 206 names that no bundler
|
|
73
|
-
could take apart, and the one specifier that revealed nothing at all.
|
|
74
|
-
|
|
75
|
-
Both are deleted. Every name now lives on the subpath that owns it, and every
|
|
76
|
-
import carries that subpath — `@pikku/core/http`, `@pikku/core/services`,
|
|
77
|
-
`@pikku/core/errors`, `@pikku/core/types`.
|
|
78
|
-
|
|
79
|
-
Deleting the facades meant the raw subpaths had to become a superset of them,
|
|
80
|
-
which they were not: the facade tree had accumulated 25 names with no raw home
|
|
81
|
-
and about 26 more filed under a different area than the module they came from.
|
|
82
|
-
Those names moved to the area that owns them, and three areas were published as
|
|
83
|
-
new entry points rather than left on a root that is going away — `./types` (the
|
|
84
|
-
shared type surface, the largest single destination), `./state` and
|
|
85
|
-
`./classification`.
|
|
86
|
-
|
|
87
|
-
`./classification` is one door onto one subject: what a value is and how it must
|
|
88
|
-
be handled. Its three halves would each have been an entry point — the brands
|
|
89
|
-
and manifest types, the stored-form helpers (`hashToken`, `unsafeAsSealed` and
|
|
90
|
-
friends), and `SecretValue` — split by whether a name happens to be a type or a
|
|
91
|
-
value, which is the same defect as the facades. The duration and versioned-id
|
|
92
|
-
helpers went to `./utils`, which already published, and `PikkuRequest` went to
|
|
93
|
-
`./function`: it is the transport-agnostic request base, not an HTTP one — HTTP
|
|
94
|
-
has `PikkuHTTPAbstractRequest`, and the only thing outside core that extends
|
|
95
|
-
`PikkuRequest` is Azure's timer request.
|
|
96
|
-
|
|
97
|
-
`./types` inherited the root barrel's habit before it inherited its contents, so
|
|
98
|
-
the names with an owner elsewhere were moved off it. The middleware types and the
|
|
99
|
-
five middleware factories — `pikkuMiddleware`, `pikkuMiddlewareFactory`,
|
|
100
|
-
`pikkuChannelMiddleware`, `pikkuChannelMiddlewareFactory` and
|
|
101
|
-
`pikkuAgentMiddleware`, runtime values on a types entry point — are now
|
|
102
|
-
`@pikku/core/middleware`; the function meta types are `@pikku/core/function`;
|
|
103
|
-
`SerializedError` is `@pikku/core/errors`; and the generic TypeScript helpers
|
|
104
|
-
(`MakeRequired`, `PickRequired`, `PickOptional`, `RequireAtLeastOne`,
|
|
105
|
-
`JSONPrimitive`, `JSONValue`) are `@pikku/core/utils`. What is left on `./types`
|
|
106
|
-
is the vocabulary the wirings share, which no single module owns.
|
|
107
|
-
|
|
108
|
-
`pikku` was itself a root barrel — `export * from '@pikku/core'` — and
|
|
109
|
-
now exports only the services it bundles.
|
|
110
|
-
|
|
111
|
-
One module survives at the old specifier, and only for the bootstrap:
|
|
112
|
-
`packages/cli` is generated by the _published_ CLI pinned in its `build.sh`, and
|
|
113
|
-
that CLI still writes a bare `@pikku/core` into the files it generates for the
|
|
114
|
-
CLI itself. `bootstrap-compat/root.ts` carries the eight types it names, a test
|
|
115
|
-
in core fails if that list grows, and it goes when the pin moves to a CLI
|
|
116
|
-
released from this branch. The adapter names the pinned CLI reaches for —
|
|
117
|
-
`pikkuState` and `CreateWireServices` — are rewritten to `@pikku/core/state` and
|
|
118
|
-
`@pikku/core/types` by the same `build.sh` patch pass, so no second shim is
|
|
119
|
-
needed for them.
|
|
120
|
-
|
|
121
|
-
A guard test keeps the root shut: it parses imports and rejects a bare
|
|
122
|
-
`@pikku/core` rather than grepping for it, because several tests hold a user's
|
|
123
|
-
file as a template literal, where `import … from '@pikku/core'` is fixture text
|
|
124
|
-
rather than an import this repo makes.
|
|
125
|
-
|
|
126
|
-
An agent scaffold a project generated under an older CLI is refreshed rather
|
|
127
|
-
than left to fail: `pikku all` already deleted one importing an entry point
|
|
128
|
-
`@pikku/core` no longer publishes, and the `#pikku` hub joins that list.
|
|
129
|
-
Without it a project that scaffolds the agent endpoint but
|
|
130
|
-
declares no agents keeps the old file forever — the generator that would rewrite
|
|
131
|
-
it only runs when agents exist, and the file being present is what stops it
|
|
132
|
-
being regenerated as missing.
|
|
133
|
-
|
|
134
|
-
`pikku new addon` also wrote a tsconfig `paths` map naming only the deleted hub.
|
|
135
|
-
An addon's `imports` map points into `dist`, so `paths` is what resolves
|
|
136
|
-
`#pikku/<leaf>` for the addon's own source build — it now names the two leaf
|
|
137
|
-
patterns, in both the addon and its test harness.
|
|
138
|
-
|
|
139
|
-
- 786dae5: Bump every dependency whose latest release is a major across the monorepo, and
|
|
140
|
-
port the code the majors broke: `cookie` 2's `parseCookie`/`stringifySetCookie`
|
|
141
|
-
API in `@pikku/core` and the three runtime HTTP adapters, and assistant-ui 0.15's
|
|
142
|
-
store client in `@pikku/assistant-ui`.
|
|
143
|
-
- 6eef0a0: Bump every dependency to its latest compatible minor/patch across the monorepo.
|
|
144
|
-
- Updated dependencies [7722ceb]
|
|
145
|
-
- Updated dependencies [375c1ff]
|
|
146
|
-
- Updated dependencies [02a70cd]
|
|
147
|
-
- Updated dependencies [aeef159]
|
|
148
|
-
- Updated dependencies [a281de6]
|
|
149
|
-
- Updated dependencies [266e3bc]
|
|
150
|
-
- Updated dependencies [02a70cd]
|
|
151
|
-
- Updated dependencies [786dae5]
|
|
152
|
-
- Updated dependencies [6eef0a0]
|
|
153
|
-
- Updated dependencies [3561d67]
|
|
154
|
-
- Updated dependencies [a91c433]
|
|
155
|
-
- Updated dependencies [02a70cd]
|
|
156
|
-
- Updated dependencies [9537f74]
|
|
157
|
-
- Updated dependencies [2b57ca8]
|
|
158
|
-
- Updated dependencies [266e3bc]
|
|
159
|
-
- Updated dependencies [9fce0f1]
|
|
160
|
-
- Updated dependencies [83683a0]
|
|
161
|
-
- Updated dependencies [456c88b]
|
|
162
|
-
- Updated dependencies [456c88b]
|
|
163
|
-
- Updated dependencies [c127273]
|
|
164
|
-
- @pikku/core@0.12.85
|
|
165
|
-
|
|
166
|
-
## 0.12.6
|
|
167
|
-
|
|
168
|
-
### Patch Changes
|
|
169
|
-
|
|
170
|
-
- 6794681: Publish the ecosystem surface as per-area sub-barrels under `@pikku/core/ecosystem/*`, and point generated code, the CLI, the inspector and the runtime adapters at them.
|
|
171
|
-
|
|
172
|
-
348 names that only generated code, the toolchain or a runtime adapter ever imports now have a second home on `@pikku/core/ecosystem/<area>` — one sub-barrel per area, matching how core already publishes its entrypoints, so no single barrel grows without bound and a consumer only pulls in the area it uses.
|
|
173
|
-
|
|
174
|
-
This step is additive: every name is still exported from the entrypoint it was published from before, so nothing downstream breaks. Removing them from the app-facing barrels is a later change, and needs a release carrying `./ecosystem/*` first.
|
|
175
|
-
|
|
176
|
-
- Updated dependencies [7406bfe]
|
|
177
|
-
- Updated dependencies [6794681]
|
|
178
|
-
- @pikku/core@0.12.84
|
|
179
|
-
|
|
180
|
-
## 0.12.5
|
|
181
|
-
|
|
182
|
-
### Patch Changes
|
|
183
|
-
|
|
184
|
-
- dbff6ae: **A delayed RPC now actually runs.** `InMemorySchedulerService.scheduleRPC`
|
|
185
|
-
dispatched through `runScheduledTask`, which resolves names against the wired
|
|
186
|
-
_cron task_ registry — a registry no internally scheduled RPC is ever in. Every
|
|
187
|
-
such call died as `ScheduledTaskNotFoundError` and was swallowed into a log
|
|
188
|
-
line, and the payload captured alongside it was never forwarded. The one that
|
|
189
|
-
mattered was `pikkuWorkflowSleeper`: it is what wakes a run from
|
|
190
|
-
`workflow.sleep`, so an async workflow containing a sleep stopped at the first
|
|
191
|
-
one and stayed `running` forever. It now invokes the RPC with its data, matching
|
|
192
|
-
what the BullMQ and pg-boss schedulers already do.
|
|
193
|
-
- Updated dependencies [41c1a95]
|
|
194
|
-
- Updated dependencies [ce96383]
|
|
195
|
-
- Updated dependencies [7e60867]
|
|
196
|
-
- Updated dependencies [f8f1244]
|
|
197
|
-
- Updated dependencies [dcf20cb]
|
|
198
|
-
- Updated dependencies [6512384]
|
|
199
|
-
- Updated dependencies [e3b4c14]
|
|
200
|
-
- Updated dependencies [efd0ed1]
|
|
201
|
-
- Updated dependencies [cba98fb]
|
|
202
|
-
- Updated dependencies [ce96383]
|
|
203
|
-
- Updated dependencies [f8f1244]
|
|
204
|
-
- Updated dependencies [f8f1244]
|
|
205
|
-
- Updated dependencies [6e93a35]
|
|
206
|
-
- Updated dependencies [6dada45]
|
|
207
|
-
- @pikku/core@0.12.80
|
|
208
|
-
|
|
209
|
-
## 0.12.4
|
|
210
|
-
|
|
211
|
-
### Patch Changes
|
|
212
|
-
|
|
213
|
-
- daec082: Drop Node 22 support — the minimum supported runtime is now Node 24 (LTS).
|
|
214
|
-
|
|
215
|
-
Node 22 deadlocks `pikku dev` at `loadUserBootstrap` (tsx `register()` + `require(esm)` cycle handling on node 22.12+), and Node 20 is already below our floor. The `engines.node` requirement is raised to `>=24` across all packages, matching `.nvmrc` and the CI test matrix. Closes #751.
|
|
216
|
-
|
|
217
|
-
- Updated dependencies [7b17b14]
|
|
218
|
-
- Updated dependencies [daec082]
|
|
219
|
-
- Updated dependencies [e0fd352]
|
|
220
|
-
- @pikku/core@0.12.58
|
|
221
|
-
|
|
222
|
-
## 0.12.3
|
|
223
|
-
|
|
224
|
-
### Patch Changes
|
|
225
|
-
|
|
226
|
-
- 41ce2cb: Upgrade to TypeScript 6 and raise the minimum Node.js version to 22.
|
|
227
|
-
|
|
228
|
-
All packages now build against `typescript@^6.0.3` and declare `engines.node >= 22`. Internal tooling (`ts-json-schema-generator`, `zod-to-ts`) was bumped to TypeScript 6-compatible releases.
|
|
229
|
-
|
|
230
|
-
- Updated dependencies [41ce2cb]
|
|
231
|
-
- @pikku/core@0.12.44
|
|
232
|
-
|
|
233
|
-
## 0.12.0
|
|
234
|
-
|
|
235
|
-
## 0.12.2
|
|
236
|
-
|
|
237
|
-
### Patch Changes
|
|
238
|
-
|
|
239
|
-
- 3e04565: chore: update dependencies to latest minor/patch versions
|
|
240
|
-
- Updated dependencies [cc4c9e9]
|
|
241
|
-
- Updated dependencies [3e04565]
|
|
242
|
-
- @pikku/core@0.12.2
|
|
243
|
-
|
|
244
|
-
## 0.12.1
|
|
245
|
-
|
|
246
|
-
### Patch Changes
|
|
247
|
-
|
|
248
|
-
- e04531f: Code quality improvements: resolve oxlint warnings and apply autofixes across the codebase (unused bindings, unnecessary constructors, prefer `const` over `let`, etc.). No behaviour changes.
|
|
249
|
-
- Updated dependencies [62a8725]
|
|
250
|
-
- Updated dependencies [a3bdb0d]
|
|
251
|
-
- Updated dependencies [e0349ff]
|
|
252
|
-
- Updated dependencies [62a8725]
|
|
253
|
-
- Updated dependencies [e04531f]
|
|
254
|
-
- Updated dependencies [62a8725]
|
|
255
|
-
- Updated dependencies [a83efb8]
|
|
256
|
-
- Updated dependencies [8eed717]
|
|
257
|
-
- Updated dependencies [62a8725]
|
|
258
|
-
- Updated dependencies [62a8725]
|
|
259
|
-
- Updated dependencies [62a8725]
|
|
260
|
-
- @pikku/core@0.12.1
|
|
261
|
-
|
|
262
|
-
### New Features
|
|
263
|
-
|
|
264
|
-
- `InMemorySchedulerService` replacing `PikkuTaskScheduler` with full `SchedulerService` interface
|
|
265
|
-
- Recurring cron task support via `node-cron`
|
|
266
|
-
- `setServices()`, `start()`, `stop()` lifecycle methods
|
|
267
|
-
|
|
268
|
-
## 0.11.0
|
|
269
|
-
|
|
270
|
-
## 0.11.1
|
|
271
|
-
|
|
272
|
-
### Patch Changes
|
|
273
|
-
|
|
274
|
-
- 4b811db: chore: updating all dependencies
|
|
275
|
-
- 06e1a31: breaking: change session services to wire services
|
|
276
|
-
- Updated dependencies [4b811db]
|
|
277
|
-
- Updated dependencies [e12a00c]
|
|
278
|
-
- Updated dependencies [4579434]
|
|
279
|
-
- Updated dependencies [28aeb7f]
|
|
280
|
-
- Updated dependencies [ce902b1]
|
|
281
|
-
- Updated dependencies [06e1a31]
|
|
282
|
-
- @pikku/core@0.11.1
|
|
283
|
-
|
|
284
|
-
### Minor Changes
|
|
285
|
-
|
|
286
|
-
- Workflow support
|
|
287
|
-
|
|
288
|
-
# @pikku/schedule
|
|
289
|
-
|
|
290
|
-
## 0.10.0
|
|
291
|
-
|
|
292
|
-
This release includes significant improvements across the framework including tree-shaking support, middleware/permission factories, enhanced CLI functionality, improved TypeScript type safety, and comprehensive test strategies.
|
|
293
|
-
|
|
294
|
-
For complete details, see https://pikku.dev/changelogs/0_10_0.md
|
|
295
|
-
|
|
296
|
-
## 0.9.3-next.0
|
|
297
|
-
|
|
298
|
-
### Patch Changes
|
|
299
|
-
|
|
300
|
-
- Updated dependencies
|
|
301
|
-
- @pikku/core@0.9.12-next.0
|
|
302
|
-
|
|
303
|
-
## 0.9.2
|
|
304
|
-
|
|
305
|
-
### Patch Changes
|
|
306
|
-
|
|
307
|
-
- a5905a9: chore: updating all dependencies
|
|
308
|
-
- Updated dependencies [1256238]
|
|
309
|
-
- Updated dependencies [6cf8efd]
|
|
310
|
-
- Updated dependencies [d3a9a09]
|
|
311
|
-
- Updated dependencies [840e078]
|
|
312
|
-
- Updated dependencies [667d23c]
|
|
313
|
-
- Updated dependencies [a5905a9]
|
|
314
|
-
- @pikku/core@0.9.2
|
|
315
|
-
|
|
316
|
-
## 0.9.1
|
|
317
|
-
|
|
318
|
-
### Patch Changes
|
|
319
|
-
|
|
320
|
-
- fdb1593: core: bumping everything with a patch to sync up the major release inconsistencies in dependencies
|
|
321
|
-
- Updated dependencies [fdb1593]
|
|
322
|
-
- @pikku/core@0.9.1
|
|
323
|
-
|
|
324
|
-
## 0.9.0
|
|
325
|
-
|
|
326
|
-
### Breaking Changes
|
|
327
|
-
|
|
328
|
-
- Normalized all transports to use "wirings" instead of events/routes/transports for consistency across the framework
|
|
329
|
-
|
|
330
|
-
## 0.8.0
|
|
331
|
-
|
|
332
|
-
- Updating to match remaining packages
|
|
333
|
-
|
|
334
|
-
## 0.7.0
|
|
335
|
-
|
|
336
|
-
- Updating to match remaining packages
|
|
337
|
-
|
|
338
|
-
## 0.6.2
|
|
339
|
-
|
|
340
|
-
### Patch Changes
|
|
341
|
-
|
|
342
|
-
- ebc04eb: refactor: move all global state into pikku state
|
|
343
|
-
- Updated dependencies [ebc04eb]
|
|
344
|
-
- Updated dependencies [8a14f3a]
|
|
345
|
-
- Updated dependencies [2c47386]
|
|
346
|
-
- @pikku/core@0.6.17
|
|
347
|
-
|
|
348
|
-
## 0.6.1
|
|
349
|
-
|
|
350
|
-
### Patch Changes
|
|
351
|
-
|
|
352
|
-
- 0a92fa7: refactor: pulling schema into seperate package since ajv doesnt work on cloudflare (also keeps bundle size small!)
|
|
353
|
-
- Updated dependencies [0a92fa7]
|
|
354
|
-
- @pikku/core@0.6.7
|
|
355
|
-
|
|
356
|
-
## 0.6
|
|
357
|
-
|
|
358
|
-
Marking a major release to include channels and scheduled tasks
|
|
359
|
-
|
|
360
|
-
## 0.5.5
|
|
361
|
-
|
|
362
|
-
### Patch Changes
|
|
363
|
-
|
|
364
|
-
- 662a6cf: feat: adding scheduled tasks names
|
|
365
|
-
- Updated dependencies [662a6cf]
|
|
366
|
-
- Updated dependencies [c8578ea]
|
|
367
|
-
- Updated dependencies [d2f8edf]
|
|
368
|
-
- @pikku/core@0.5.29
|
|
369
|
-
|
|
370
|
-
## 0.5.4
|
|
371
|
-
|
|
372
|
-
### Patch Changes
|
|
373
|
-
|
|
374
|
-
- 886a2fb: refactor: moving singletons (like routes and channels) to global to avoid nodemodule overrides
|
|
375
|
-
- Updated dependencies [a768bad]
|
|
376
|
-
- Updated dependencies [886a2fb]
|
|
377
|
-
- Updated dependencies [886a2fb]
|
|
378
|
-
- @pikku/core@0.5.28
|
|
379
|
-
|
|
380
|
-
## 0.5.3
|
|
381
|
-
|
|
382
|
-
### Patch Changes
|
|
383
|
-
|
|
384
|
-
- 0f96787: refactor: dropping cjs support
|
|
385
|
-
- c23524a: refactor: bump to versions to ensure correct package usage
|
|
386
|
-
- Updated dependencies [0f96787]
|
|
387
|
-
- Updated dependencies [64e4a1e]
|
|
388
|
-
- Updated dependencies [c23524a]
|
|
389
|
-
- @pikku/core@0.5.25
|
|
390
|
-
|
|
391
|
-
## 0.5.2
|
|
392
|
-
|
|
393
|
-
### Patch Changes
|
|
394
|
-
|
|
395
|
-
- bba25cc: chore: updating all packages to reflect major changes
|
|
396
|
-
- Updated dependencies [bba25cc]
|
|
397
|
-
- Updated dependencies [9deb482]
|
|
398
|
-
- Updated dependencies [ee0c6ea]
|
|
399
|
-
- @pikku/core@0.5.24
|
|
400
|
-
|
|
401
|
-
## 0.5.1
|
|
402
|
-
|
|
403
|
-
### Patch Changes
|
|
404
|
-
|
|
405
|
-
- 7fa64a0: feat: making schedule session services optional
|
|
406
|
-
- 539937e: refactor: use a map instead for scheduled tasks
|
|
407
|
-
- Updated dependencies [7fa64a0]
|
|
408
|
-
- Updated dependencies [539937e]
|
|
409
|
-
- Updated dependencies [e9a9968]
|
|
410
|
-
- @pikku/core@0.5.23
|
package/run-tests.sh
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Enable nullglob to handle cases where no files match the pattern
|
|
4
|
-
shopt -s nullglob
|
|
5
|
-
|
|
6
|
-
# Initialize variables for options
|
|
7
|
-
watch_mode=false
|
|
8
|
-
coverage_mode=false
|
|
9
|
-
|
|
10
|
-
# Parse command-line options
|
|
11
|
-
while [[ $# -gt 0 ]]; do
|
|
12
|
-
case $1 in
|
|
13
|
-
--watch)
|
|
14
|
-
watch_mode=true
|
|
15
|
-
shift
|
|
16
|
-
;;
|
|
17
|
-
--coverage)
|
|
18
|
-
coverage_mode=true
|
|
19
|
-
shift
|
|
20
|
-
;;
|
|
21
|
-
*)
|
|
22
|
-
echo "Unknown option: $1"
|
|
23
|
-
exit 1
|
|
24
|
-
;;
|
|
25
|
-
esac
|
|
26
|
-
done
|
|
27
|
-
|
|
28
|
-
# Define the pattern to match your test files
|
|
29
|
-
pattern="src/*.test.ts"
|
|
30
|
-
|
|
31
|
-
# Expand the pattern into an array of files
|
|
32
|
-
files=($(find src -type f -name "*.test.ts"))
|
|
33
|
-
|
|
34
|
-
# Check if any files matched the pattern
|
|
35
|
-
if [ ${#files[@]} -eq 0 ]; then
|
|
36
|
-
echo "No test files found matching pattern: $pattern"
|
|
37
|
-
if [ "${STRICT_TEST_DISCOVERY}" = "1" ]; then
|
|
38
|
-
exit 1
|
|
39
|
-
fi
|
|
40
|
-
exit 0
|
|
41
|
-
fi
|
|
42
|
-
|
|
43
|
-
# Construct the bun command
|
|
44
|
-
#
|
|
45
|
-
# --parallel gives every test file its own worker process, which is what node's
|
|
46
|
-
# `--test` did. Several suites keep module-level caches (a TypeScript program, a
|
|
47
|
-
# temp fixture directory) that a shared process would leak between files.
|
|
48
|
-
#
|
|
49
|
-
# --timeout because bun caps a test at 5s by default where node had no cap, and
|
|
50
|
-
# the suites that build real TypeScript programs run well past that.
|
|
51
|
-
bun_cmd=(bun test --parallel --timeout 120000)
|
|
52
|
-
|
|
53
|
-
# Append options based on flags
|
|
54
|
-
if [ "$watch_mode" = true ]; then
|
|
55
|
-
# --watch reruns in one process; parallel workers have nothing to watch.
|
|
56
|
-
bun_cmd=(bun test --watch --timeout 120000)
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
if [ "$coverage_mode" = true ]; then
|
|
60
|
-
# --coverage-dir=. keeps lcov.info at the package root: CI merges every
|
|
61
|
-
# package's report by prefixing its SF paths with the file's own directory,
|
|
62
|
-
# so a nested coverage/ directory would re-root them one level too deep.
|
|
63
|
-
bun_cmd+=(--coverage --coverage-reporter=lcov --coverage-reporter=text --coverage-dir=.)
|
|
64
|
-
export PIKKU_TEST_COVERAGE=1
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
# Execute the bun command with the expanded list of files
|
|
68
|
-
"${bun_cmd[@]}" "${files[@]}"
|