@dpuse/dpuse-development 0.3.766 → 0.3.781
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/README.md +71 -103
- package/dist/dpuse-development.es.js +1622 -1610
- package/dist/dpuse-development.es.js.map +1 -1
- package/dist/types/src/actions/auditDependencies.d.ts +1 -0
- package/dist/types/src/actions/buildProject.d.ts +2 -0
- package/dist/types/src/actions/checkDependencies.d.ts +2 -0
- package/dist/types/src/actions/checkProject.d.ts +2 -0
- package/dist/types/src/actions/documentApiReference.d.ts +1 -1
- package/dist/types/src/actions/documentBundleSizes.d.ts +1 -0
- package/dist/types/src/actions/documentContributingLicense.d.ts +2 -0
- package/dist/types/src/actions/documentDependencies.d.ts +3 -0
- package/dist/types/src/actions/documentProject.d.ts +6 -0
- package/dist/types/src/actions/documentQualitySecurity.d.ts +2 -0
- package/dist/types/src/actions/formatCode.d.ts +1 -0
- package/dist/types/src/actions/lintCode.d.ts +1 -0
- package/dist/types/src/actions/publishProject.d.ts +5 -0
- package/dist/types/src/actions/releaseProject.d.ts +3 -0
- package/dist/types/src/actions/syncProjectWithGitHub.d.ts +2 -0
- package/dist/types/src/actions/testProject.d.ts +3 -0
- package/dist/types/src/index.d.ts +7 -10
- package/dist/types/src/utilities/index.d.ts +8 -0
- package/package.json +7 -14
- package/dist/types/src/actions/documentGovernance.d.ts +0 -1
- package/dist/types/src/actions/manageProject.d.ts +0 -8
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const API_REFERENCE_PATH = "API_REFERENCE.md";
|
|
2
|
+
/** Lists every export of each import path in API_REFERENCE.md. Runs with the README's sections where the project has that file. */
|
|
2
3
|
export declare function documentAPIReference(): Promise<void>;
|
|
3
|
-
export declare function writeAPIReference(stepIcon: string): Promise<void>;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
+
/** Identify licenses of the project's production and peer dependencies. Updates the table in the Dependency Licenses
|
|
2
|
+
* section of this page and summary files licenses.json and licenseTree.json in th licenses directory of this
|
|
3
|
+
* repository. Also downloads a copy of dependency license to `licenses/downloads'. */
|
|
1
4
|
export declare function documentDependencies(allowedLicenses?: string): Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface DocumentOptions {
|
|
2
|
+
allowedLicenses?: string;
|
|
3
|
+
moduleLevel?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/** Regenerates every generated section of the README, in the order they appear, then the API reference where the project keeps one. */
|
|
6
|
+
export declare function documentProject({ allowedLicenses, moduleLevel }?: DocumentOptions): Promise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PackageJson } from 'type-fest';
|
|
2
|
+
import { ModuleConfig } from '@dpuse/dpuse-shared/component/module';
|
|
3
|
+
import { ModuleTypeConfig } from '../utilities';
|
|
4
|
+
export declare function publishProject(): Promise<void>;
|
|
5
|
+
export declare function registerModule(stepIcon: string, packageJSON: PackageJson, configJSON: ModuleConfig, moduleTypeConfig: ModuleTypeConfig): Promise<void>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DocumentOptions } from './documentProject';
|
|
2
|
+
/** Bump version, builds config, builds project, regenerates the README, synchronise with GitHub and publish to npm or Cloudflare. */
|
|
3
|
+
export declare function releaseProject(documentOptions?: DocumentOptions): Promise<void>;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
export { auditDependencies } from './actions/auditDependencies';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export { documentDependencies } from './actions/documentDependencies';
|
|
6
|
-
export { documentGovernance } from './actions/documentGovernance';
|
|
7
|
-
export { documentActions } from './actions/documentActions';
|
|
8
|
-
export { documentAPIReference } from './actions/documentApiReference';
|
|
9
|
-
export { documentOpening } from './actions/documentOpening';
|
|
10
|
-
export { documentUsage } from './actions/documentUsage';
|
|
2
|
+
export { buildProject } from './actions/buildProject';
|
|
3
|
+
export { checkProject } from './actions/checkProject';
|
|
4
|
+
export { documentProject } from './actions/documentProject';
|
|
11
5
|
export { formatCode } from './actions/formatCode';
|
|
12
6
|
export { lintCode } from './actions/lintCode';
|
|
7
|
+
export { publishProject } from './actions/publishProject';
|
|
8
|
+
export { releaseProject } from './actions/releaseProject';
|
|
9
|
+
export { syncProjectWithGitHub } from './actions/syncProjectWithGitHub';
|
|
10
|
+
export { testProject } from './actions/testProject';
|
|
13
11
|
export { uploadDirectoryToR2 } from './utilities/cloudflare';
|
|
14
|
-
export { buildProject, publishProject, releaseProject, syncProjectWithGitHub, testProject } from './actions/manageProject';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PackageJson } from 'type-fest';
|
|
2
2
|
import { Dirent, ObjectEncodingOptions, Stats } from 'node:fs';
|
|
3
|
+
import { ModuleConfig } from '@dpuse/dpuse-shared/component/module';
|
|
3
4
|
export interface ModuleTypeConfig {
|
|
4
5
|
idPrefix: string;
|
|
5
6
|
typeId: 'app' | 'api' | 'connector' | 'context' | 'cookbook' | 'development' | 'engine' | 'eslint' | 'github' | 'kb' | 'presenter' | 'resources' | 'shared' | 'tool';
|
|
@@ -9,12 +10,17 @@ export interface ModuleTypeConfig {
|
|
|
9
10
|
export declare const FALLOW_DIRECTORY = "code-health-reports/fallow";
|
|
10
11
|
export declare const FALLOW_BADGE_PATH = "code-health-reports/fallow/badge.json";
|
|
11
12
|
export declare const FALLOW_REPORT_PATH = "code-health-reports/fallow/index.md";
|
|
13
|
+
export declare const CONTRIBUTING_LICENSE_END_MARKER = "<!-- CONTRIBUTING_LICENSE_END -->";
|
|
14
|
+
export declare const CONTRIBUTING_LICENSE_START_MARKER = "<!-- CONTRIBUTING_LICENSE_START -->";
|
|
15
|
+
export declare const QUALITY_SECURITY_END_MARKER = "<!-- QUALITY_SECURITY_END -->";
|
|
16
|
+
export declare const QUALITY_SECURITY_START_MARKER = "<!-- QUALITY_SECURITY_START -->";
|
|
12
17
|
export declare function clearDirectory(label: string | undefined, directoryPath: string): Promise<void>;
|
|
13
18
|
export declare function getDirectoryEntries(path: string): Promise<string[]>;
|
|
14
19
|
export declare function getDirectoryEntries(path: string, options: ObjectEncodingOptions): Promise<Dirent[]>;
|
|
15
20
|
export declare function execCommand(label: string | undefined, command_: string, arguments_: string[], outputFilePath?: string): Promise<void>;
|
|
16
21
|
export declare function spawnCommand(label: string, command: string, arguments_: string[], isErrorIgnored?: boolean, isShellUsed?: boolean): Promise<void>;
|
|
17
22
|
export declare function spawnCommandToFile(label: string, command: string, arguments_: string[], outputPath: string, isErrorIgnored?: boolean): Promise<void>;
|
|
23
|
+
export declare function migrateGovernanceSection(): Promise<void>;
|
|
18
24
|
export declare function readJSONFile<T>(path: string): Promise<T>;
|
|
19
25
|
export declare function readTextFile(path: string): Promise<string>;
|
|
20
26
|
export declare function readTextFileOrNull(path: string): Promise<string | null>;
|
|
@@ -30,4 +36,6 @@ export declare function resolveOwnerAndRepo(packageJSON: PackageJson, purpose: s
|
|
|
30
36
|
repo: string;
|
|
31
37
|
};
|
|
32
38
|
export declare function getStatsForPath(path: string): Promise<Stats>;
|
|
39
|
+
export declare function buildModuleConfig(stepIcon: string, packageJSON: PackageJson, moduleTypeConfig: ModuleTypeConfig): Promise<ModuleConfig>;
|
|
40
|
+
export declare function bumpPackageVersion(stepIcon: string, packageJSON: PackageJson, path?: string): Promise<void>;
|
|
33
41
|
export declare function extractOperationsFromSource<T>(source: string): T[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpuse/dpuse-development",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.781",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Actions for managing DPUse projects.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -68,21 +68,14 @@
|
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"audit": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.auditDependencies())\"",
|
|
71
|
-
"build": "vite build
|
|
72
|
-
"check": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.
|
|
73
|
-
"document": "
|
|
74
|
-
"documentBundleSizes": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.documentBundleSizes())\"",
|
|
75
|
-
"documentDependencies": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.documentDependencies('Apache-2.0;BSD-3-Clause;MIT'))\"",
|
|
76
|
-
"documentGovernance": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.documentGovernance())\"",
|
|
77
|
-
"documentOpening": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.documentOpening())\"",
|
|
78
|
-
"documentUsage": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.documentUsage())\"",
|
|
71
|
+
"build": "vite build",
|
|
72
|
+
"check": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.checkProject())\"",
|
|
73
|
+
"document": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.documentProject({ allowedLicenses: 'Apache-2.0;BSD-3-Clause;MIT' }))\"",
|
|
79
74
|
"format": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.formatCode())\"",
|
|
80
|
-
"health": "npm run test:coverage && fallow --coverage coverage/coverage-final.json",
|
|
81
75
|
"lint": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.lintCode())\"",
|
|
82
|
-
"release": "npm run sync && gh release create \"v$(npm pkg get version | tr -d '\"')\" --target \"$(git rev-parse HEAD)\" --generate-notes --latest",
|
|
76
|
+
"release": "npm run build && npm run document && npm run sync && gh release create \"v$(npm pkg get version | tr -d '\"')\" --target \"$(git rev-parse HEAD)\" --generate-notes --latest",
|
|
83
77
|
"sync": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.syncProjectWithGitHub())\"",
|
|
84
|
-
"test": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.testProject())\""
|
|
85
|
-
"test:coverage": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.testProject(['unit'], true))\""
|
|
78
|
+
"test": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.testProject())\""
|
|
86
79
|
},
|
|
87
80
|
"peerDependencies": {
|
|
88
81
|
"typescript": "^6.0.3"
|
|
@@ -111,4 +104,4 @@
|
|
|
111
104
|
"vite-plugin-wasm": "^3.6.0",
|
|
112
105
|
"vitest": "^5.0.2"
|
|
113
106
|
}
|
|
114
|
-
}
|
|
107
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function documentGovernance(): Promise<void>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type TestTypeId = 'e2e' | 'unit';
|
|
2
|
-
/** Build a project. */
|
|
3
|
-
export declare function buildProject(): Promise<void>;
|
|
4
|
-
export declare function publishProject(): Promise<void>;
|
|
5
|
-
export declare function releaseProject(): Promise<void>;
|
|
6
|
-
export declare function syncProjectWithGitHub(): Promise<void>;
|
|
7
|
-
/** Runs the requested types of test, skipping any type this project has not configured. Runs the requested types of test, skipping any type this project has not configured. Runs the requested types of test, skipping any type this project has not configured. Runs the requested types of test, skipping any type this project has not configured. Runs the requested types of test, skipping any type this project has not configured. Runs the requested types of test, skipping any type this project has not configured. Runs the requested types of test, skipping any type this project has not configured. Runs the requested types of test, skipping any type this project has not configured. */
|
|
8
|
-
export declare function testProject(testTypeIds?: TestTypeId[], isCoverageMeasured?: boolean): Promise<void>;
|