@pikku/schedule 0.12.5 → 0.12.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,121 @@
1
+ ## 0.12.7
2
+
3
+ ### Patch Changes
4
+
5
+ - 266e3bc: One door per name: `@pikku/core/ecosystem/*` and the package root are gone
6
+
7
+ `@pikku/core` published every module twice. `ecosystem/http` re-exported
8
+ `./http`, `ecosystem/services` re-exported `./services`, and a name was
9
+ reachable through either — so every addition had to be made in two places, and a
10
+ consumer's import said nothing about what it actually used. The package root was
11
+ the same problem at a larger scale: a single barrel of 206 names that no bundler
12
+ could take apart, and the one specifier that revealed nothing at all.
13
+
14
+ Both are deleted. Every name now lives on the subpath that owns it, and every
15
+ import carries that subpath — `@pikku/core/http`, `@pikku/core/services`,
16
+ `@pikku/core/errors`, `@pikku/core/types`.
17
+
18
+ Deleting the facades meant the raw subpaths had to become a superset of them,
19
+ which they were not: the facade tree had accumulated 25 names with no raw home
20
+ and about 26 more filed under a different area than the module they came from.
21
+ Those names moved to the area that owns them, and three areas were published as
22
+ new entry points rather than left on a root that is going away — `./types` (the
23
+ shared type surface, the largest single destination), `./state` and
24
+ `./classification`.
25
+
26
+ `./classification` is one door onto one subject: what a value is and how it must
27
+ be handled. Its three halves would each have been an entry point — the brands
28
+ and manifest types, the stored-form helpers (`hashToken`, `unsafeAsSealed` and
29
+ friends), and `SecretValue` — split by whether a name happens to be a type or a
30
+ value, which is the same defect as the facades. The duration and versioned-id
31
+ helpers went to `./utils`, which already published, and `PikkuRequest` went to
32
+ `./function`: it is the transport-agnostic request base, not an HTTP one — HTTP
33
+ has `PikkuHTTPAbstractRequest`, and the only thing outside core that extends
34
+ `PikkuRequest` is Azure's timer request.
35
+
36
+ `./types` inherited the root barrel's habit before it inherited its contents, so
37
+ the names with an owner elsewhere were moved off it. The middleware types and the
38
+ five middleware factories — `pikkuMiddleware`, `pikkuMiddlewareFactory`,
39
+ `pikkuChannelMiddleware`, `pikkuChannelMiddlewareFactory` and
40
+ `pikkuAgentMiddleware`, runtime values on a types entry point — are now
41
+ `@pikku/core/middleware`; the function meta types are `@pikku/core/function`;
42
+ `SerializedError` is `@pikku/core/errors`; and the generic TypeScript helpers
43
+ (`MakeRequired`, `PickRequired`, `PickOptional`, `RequireAtLeastOne`,
44
+ `JSONPrimitive`, `JSONValue`) are `@pikku/core/utils`. What is left on `./types`
45
+ is the vocabulary the wirings share, which no single module owns.
46
+
47
+ `pikku` was itself a root barrel — `export * from '@pikku/core'` — and
48
+ now exports only the services it bundles.
49
+
50
+ One module survives at the old specifier, and only for the bootstrap:
51
+ `packages/cli` is generated by the _published_ CLI pinned in its `build.sh`, and
52
+ that CLI still writes a bare `@pikku/core` into the files it generates for the
53
+ CLI itself. `bootstrap-compat/root.ts` carries the eight types it names, a test
54
+ in core fails if that list grows, and it goes when the pin moves to a CLI
55
+ released from this branch. The adapter names the pinned CLI reaches for —
56
+ `pikkuState` and `CreateWireServices` — are rewritten to `@pikku/core/state` and
57
+ `@pikku/core/types` by the same `build.sh` patch pass, so no second shim is
58
+ needed for them.
59
+
60
+ A guard test keeps the root shut: it parses imports and rejects a bare
61
+ `@pikku/core` rather than grepping for it, because several tests hold a user's
62
+ file as a template literal, where `import … from '@pikku/core'` is fixture text
63
+ rather than an import this repo makes.
64
+
65
+ An agent scaffold a project generated under an older CLI is refreshed rather
66
+ than left to fail: `pikku all` already deleted one importing an entry point
67
+ `@pikku/core` no longer publishes, and the `#pikku` hub joins that list.
68
+ Without it a project that scaffolds the agent endpoint but
69
+ declares no agents keeps the old file forever — the generator that would rewrite
70
+ it only runs when agents exist, and the file being present is what stops it
71
+ being regenerated as missing.
72
+
73
+ `pikku new addon` also wrote a tsconfig `paths` map naming only the deleted hub.
74
+ An addon's `imports` map points into `dist`, so `paths` is what resolves
75
+ `#pikku/<leaf>` for the addon's own source build — it now names the two leaf
76
+ patterns, in both the addon and its test harness.
77
+
78
+ - 786dae5: Bump every dependency whose latest release is a major across the monorepo, and
79
+ port the code the majors broke: `cookie` 2's `parseCookie`/`stringifySetCookie`
80
+ API in `@pikku/core` and the three runtime HTTP adapters, and assistant-ui 0.15's
81
+ store client in `@pikku/assistant-ui`.
82
+ - 6eef0a0: Bump every dependency to its latest compatible minor/patch across the monorepo.
83
+ - Updated dependencies [7722ceb]
84
+ - Updated dependencies [375c1ff]
85
+ - Updated dependencies [02a70cd]
86
+ - Updated dependencies [aeef159]
87
+ - Updated dependencies [a281de6]
88
+ - Updated dependencies [266e3bc]
89
+ - Updated dependencies [02a70cd]
90
+ - Updated dependencies [786dae5]
91
+ - Updated dependencies [6eef0a0]
92
+ - Updated dependencies [3561d67]
93
+ - Updated dependencies [a91c433]
94
+ - Updated dependencies [02a70cd]
95
+ - Updated dependencies [9537f74]
96
+ - Updated dependencies [2b57ca8]
97
+ - Updated dependencies [266e3bc]
98
+ - Updated dependencies [9fce0f1]
99
+ - Updated dependencies [83683a0]
100
+ - Updated dependencies [456c88b]
101
+ - Updated dependencies [456c88b]
102
+ - Updated dependencies [c127273]
103
+ - @pikku/core@0.12.85
104
+
105
+ ## 0.12.6
106
+
107
+ ### Patch Changes
108
+
109
+ - 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.
110
+
111
+ 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.
112
+
113
+ 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.
114
+
115
+ - Updated dependencies [7406bfe]
116
+ - Updated dependencies [6794681]
117
+ - @pikku/core@0.12.84
118
+
1
119
  ## 0.12.5
2
120
 
3
121
  ### Patch Changes
@@ -1,5 +1,6 @@
1
- import type { CoreUserSession, ScheduledTaskInfo, ScheduledTaskSummary } from '@pikku/core';
2
- import { SchedulerService } from '@pikku/core';
1
+ import type { CoreUserSession } from '@pikku/core/types';
2
+ import type { ScheduledTaskInfo, ScheduledTaskSummary } from '@pikku/core/services';
3
+ import { SchedulerService } from '@pikku/core/services';
3
4
  /**
4
5
  * In-memory SchedulerService implementation.
5
6
  * Uses CronJob for recurring tasks and setTimeout for delayed RPCs.
@@ -1,7 +1,9 @@
1
1
  import { CronJob } from 'cron';
2
- import { SchedulerService, parseDurationString } from '@pikku/core';
3
- import { pikkuState, getSingletonServices } from '@pikku/core/ecosystem';
4
- import { runScheduledTask, getScheduledTasks } from '@pikku/core/scheduler';
2
+ import { SchedulerService } from '@pikku/core/services';
3
+ import { parseDurationString } from '@pikku/core/utils';
4
+ import { pikkuState, getSingletonServices } from '@pikku/core/state';
5
+ import { runScheduledTask } from '@pikku/core/scheduler';
6
+ import { getScheduledTasks } from '@pikku/core/scheduler';
5
7
  import { rpcService } from '@pikku/core/rpc';
6
8
  const getLogger = () => {
7
9
  return pikkuState(null, 'package', 'singletonServices').logger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/schedule",
3
- "version": "0.12.5",
3
+ "version": "0.12.7",
4
4
  "description": "In-memory scheduler service for Pikku cron wirings",
5
5
  "author": "yasser.fadl@gmail.com",
6
6
  "license": "MIT",
@@ -19,10 +19,10 @@
19
19
  "prepublishOnly": "yarn build"
20
20
  },
21
21
  "peerDependencies": {
22
- "@pikku/core": "^0.12.80"
22
+ "@pikku/core": "^0.12.85"
23
23
  },
24
24
  "devDependencies": {
25
- "@types/node": "^24.11.0",
25
+ "@types/node": "^24.13.3",
26
26
  "typescript": "^6.0.3"
27
27
  },
28
28
  "engines": {
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "cron": "^4.4.0",
33
- "cron-schedule": "^5.0.4"
33
+ "cron-schedule": "^6.0.0"
34
34
  },
35
35
  "exports": {
36
36
  ".": {
@@ -39,4 +39,4 @@
39
39
  "default": "./dist/index.js"
40
40
  }
41
41
  }
42
- }
42
+ }
@@ -1,6 +1,6 @@
1
1
  import { describe, test } from 'node:test'
2
2
  import assert from 'node:assert/strict'
3
- import { pikkuState } from '@pikku/core/ecosystem'
3
+ import { pikkuState } from '@pikku/core/state'
4
4
  import { addFunction } from '@pikku/core/function'
5
5
 
6
6
  import { InMemorySchedulerService } from './in-memory-scheduler-service.js'
@@ -1,12 +1,14 @@
1
1
  import { CronJob } from 'cron'
2
+ import type { CoreUserSession } from '@pikku/core/types'
2
3
  import type {
3
- CoreUserSession,
4
4
  ScheduledTaskInfo,
5
5
  ScheduledTaskSummary,
6
- } from '@pikku/core'
7
- import { SchedulerService, parseDurationString } from '@pikku/core'
8
- import { pikkuState, getSingletonServices } from '@pikku/core/ecosystem'
9
- import { runScheduledTask, getScheduledTasks } from '@pikku/core/scheduler'
6
+ } from '@pikku/core/services'
7
+ import { SchedulerService } from '@pikku/core/services'
8
+ import { parseDurationString } from '@pikku/core/utils'
9
+ import { pikkuState, getSingletonServices } from '@pikku/core/state'
10
+ import { runScheduledTask } from '@pikku/core/scheduler'
11
+ import { getScheduledTasks } from '@pikku/core/scheduler'
10
12
  import { rpcService } from '@pikku/core/rpc'
11
13
 
12
14
  interface DelayedTask {