@git.zone/tspublish 1.11.4 → 1.11.5
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_ts/00_commitinfo_data.js +1 -1
- package/package.json +1 -1
- package/readme.hints.md +20 -1
- package/readme.md +12 -38
- package/ts/00_commitinfo_data.ts +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@git.zone/tspublish',
|
|
6
|
-
version: '1.11.
|
|
6
|
+
version: '1.11.5',
|
|
7
7
|
description: 'A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxxQkFBcUI7SUFDM0IsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHdJQUF3STtDQUN0SixDQUFBIn0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@git.zone/tspublish",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.",
|
|
6
6
|
"main": "dist_ts/index.js",
|
package/readme.hints.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
# Project Readme Hints
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Overview
|
|
4
|
+
- `@git.zone/tspublish` is a CLI tool + library for publishing multiple TypeScript packages from a monorepo
|
|
5
|
+
- Main entry: `ts/index.ts` exports `TsPublish` class and `runCli()` function
|
|
6
|
+
- CLI entry: `cli.js` (compiled) → `cli.child.ts` (dev) → `ts/index.ts`
|
|
7
|
+
|
|
8
|
+
## Key Architecture
|
|
9
|
+
- `TsPublish` - main orchestrator class, discovers modules and runs publish pipeline
|
|
10
|
+
- `PublishModule` - handles individual module build/publish (not exported from main index)
|
|
11
|
+
- `GiteaAssets` - fetches CLI templates from code.foss.global Gitea API
|
|
12
|
+
- `plugins.ts` - all dependencies imported here, uses `@push.rocks/smartfs` for filesystem ops
|
|
13
|
+
- `logging.ts` - color-coded console output using consolecolor + smartlog
|
|
14
|
+
|
|
15
|
+
## Configuration
|
|
16
|
+
- Uses `.smartconfig.json` (not npmextra.json) with `@push.rocks/smartconfig`
|
|
17
|
+
- Each publishable sub-module has its own `tspublish.json` in `ts_*` directories
|
|
18
|
+
- Registry config supports `useBase`, `extendBase`, or explicit URLs
|
|
19
|
+
|
|
20
|
+
## Dependencies
|
|
21
|
+
- All dependencies at latest versions as of 2026-03-24
|
|
22
|
+
- No `ts_*/tspublish.json` sub-modules exist in this project itself
|
package/readme.md
CHANGED
|
@@ -155,7 +155,7 @@ If `registries` is an empty array `[]`, the package will be built but **not publ
|
|
|
155
155
|
|
|
156
156
|
When packages depend on each other, use the `order` field to control build sequence:
|
|
157
157
|
|
|
158
|
-
```
|
|
158
|
+
```jsonc
|
|
159
159
|
// ts_core/tspublish.json — builds first
|
|
160
160
|
{
|
|
161
161
|
"name": "@myorg/core",
|
|
@@ -200,28 +200,14 @@ TSPublish will:
|
|
|
200
200
|
import { TsPublish } from '@git.zone/tspublish';
|
|
201
201
|
|
|
202
202
|
const publisher = new TsPublish();
|
|
203
|
-
await publisher.publish(process.cwd());
|
|
204
|
-
```
|
|
205
203
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
```typescript
|
|
209
|
-
import { TsPublish, PublishModule } from '@git.zone/tspublish';
|
|
204
|
+
// Publish all discovered modules in the current directory
|
|
205
|
+
await publisher.publish(process.cwd());
|
|
210
206
|
|
|
211
|
-
|
|
207
|
+
// Or just discover modules without publishing
|
|
212
208
|
const modules = await publisher.getModuleSubDirs('./my-monorepo');
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
const mod = new PublishModule(publisher, {
|
|
216
|
-
monoRepoDir: './my-monorepo',
|
|
217
|
-
packageSubFolder: name,
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
await mod.init(); // Resolve deps, validate version
|
|
221
|
-
await mod.createPublishModuleDir(); // Scaffold dist_publish_* directory
|
|
222
|
-
await mod.build(); // Compile TypeScript
|
|
223
|
-
await mod.publish(); // Publish to registries
|
|
224
|
-
}
|
|
209
|
+
console.log(modules);
|
|
210
|
+
// => { ts_core: { name: '@myorg/core', order: 1, ... }, ts_utils: { ... } }
|
|
225
211
|
```
|
|
226
212
|
|
|
227
213
|
## 🔧 How It Works
|
|
@@ -263,6 +249,8 @@ For each discovered module, tspublish:
|
|
|
263
249
|
|
|
264
250
|
### TsPublish
|
|
265
251
|
|
|
252
|
+
The main class that orchestrates the entire publishing pipeline.
|
|
253
|
+
|
|
266
254
|
```typescript
|
|
267
255
|
class TsPublish {
|
|
268
256
|
/** Publish all discovered modules in a monorepo directory */
|
|
@@ -273,26 +261,10 @@ class TsPublish {
|
|
|
273
261
|
}
|
|
274
262
|
```
|
|
275
263
|
|
|
276
|
-
### PublishModule
|
|
277
|
-
|
|
278
|
-
```typescript
|
|
279
|
-
class PublishModule {
|
|
280
|
-
/** Initialize: resolve dependencies, validate version against registry */
|
|
281
|
-
async init(): Promise<void>;
|
|
282
|
-
|
|
283
|
-
/** Create the dist_publish_* directory with all necessary files */
|
|
284
|
-
async createPublishModuleDir(): Promise<void>;
|
|
285
|
-
|
|
286
|
-
/** Build the TypeScript package */
|
|
287
|
-
async build(): Promise<void>;
|
|
288
|
-
|
|
289
|
-
/** Publish to all configured registries */
|
|
290
|
-
async publish(): Promise<void>;
|
|
291
|
-
}
|
|
292
|
-
```
|
|
293
|
-
|
|
294
264
|
### ITsPublishJson
|
|
295
265
|
|
|
266
|
+
The configuration interface for each `tspublish.json` file:
|
|
267
|
+
|
|
296
268
|
```typescript
|
|
297
269
|
interface ITsPublishJson {
|
|
298
270
|
name: string; // Published package name
|
|
@@ -305,6 +277,8 @@ interface ITsPublishJson {
|
|
|
305
277
|
|
|
306
278
|
### GiteaAssets
|
|
307
279
|
|
|
280
|
+
Utility class for fetching files from Gitea repositories (used internally for CLI template retrieval):
|
|
281
|
+
|
|
308
282
|
```typescript
|
|
309
283
|
class GiteaAssets {
|
|
310
284
|
constructor(options: { giteaBaseUrl: string; token?: string });
|
package/ts/00_commitinfo_data.ts
CHANGED