@ojiepermana/angular 21.0.7 → 21.0.8

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/.npmignore ADDED
@@ -0,0 +1,2 @@
1
+ # Nested package.json's are only needed for development.
2
+ **/package.json
package/README.md CHANGED
@@ -33,6 +33,42 @@ If you install the package with `npm install`, `bun add`, `pnpm add`, or `yarn
33
33
  add` directly, peer dependency installation falls back to the package
34
34
  manager's own behavior.
35
35
 
36
+ ## SDK generator in a consumer workspace
37
+
38
+ After `@ojiepermana/angular` is installed, a consumer workspace can scaffold an
39
+ SDK config file under `config/sdk.config.json` and generate an Angular SDK directly from the published
40
+ schematics:
41
+
42
+ ```bash
43
+ ng generate @ojiepermana/angular:sdk-init
44
+ # edit config/sdk.config.json
45
+ ng generate @ojiepermana/angular:sdk
46
+ ```
47
+
48
+ The main consumer flow is: create `config/sdk.config.json`, adjust the OpenAPI
49
+ input and output target, then run the SDK generator.
50
+
51
+ If you want short script aliases in the consumer app's `package.json`, add:
52
+
53
+ ```json
54
+ {
55
+ "scripts": {
56
+ "gen:sdk:init": "ng generate @ojiepermana/angular:sdk-init",
57
+ "gen:sdk": "ng generate @ojiepermana/angular:sdk"
58
+ }
59
+ }
60
+ ```
61
+
62
+ Consumers do not need a `gen:sdk:build` step because the npm package already
63
+ ships the compiled schematic runtime.
64
+
65
+ Common follow-up options:
66
+
67
+ ```bash
68
+ ng generate @ojiepermana/angular:sdk-init --path=config/my-sdk.config.json
69
+ ng generate @ojiepermana/angular:sdk --config=config/my-sdk.config.json --dry-run
70
+ ```
71
+
36
72
  ## Code scaffolding
37
73
 
38
74
  Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/ojiepermana-angular-chart.mjs",
3
+ "typings": "../types/ojiepermana-angular-chart.d.ts"
4
+ }
package/collection.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "schema": "./generator/api/schematics/sdk/schema.json"
13
13
  },
14
14
  "sdk-init": {
15
- "description": "Create sdk.config.json at the workspace root.",
15
+ "description": "Create config/sdk.config.json under the workspace root.",
16
16
  "factory": "./generator/api/bin/schematics/init/index.js#init",
17
17
  "schema": "./generator/api/schematics/init/schema.json"
18
18
  },
@@ -22,7 +22,7 @@
22
22
  "schema": "./generator/guide/schematics/build/schema.json"
23
23
  },
24
24
  "guide-init": {
25
- "description": "Create guide.config.json at the workspace root.",
25
+ "description": "Create config/guide.config.json under the workspace root.",
26
26
  "factory": "./generator/guide/bin/schematics/init/index.js#init",
27
27
  "schema": "./generator/guide/schematics/init/schema.json"
28
28
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/ojiepermana-angular-component.mjs",
3
+ "typings": "../types/ojiepermana-angular-component.d.ts"
4
+ }
@@ -25,17 +25,38 @@ bun run gen:sdk
25
25
  ```bash
26
26
  # inside an Angular workspace that installed @ojiepermana/angular
27
27
  ng generate @ojiepermana/angular:sdk-init
28
+ # edit config/sdk.config.json
28
29
  ng generate @ojiepermana/angular:sdk
29
30
  ```
30
31
 
32
+ The main consumer feature is generating an SDK from
33
+ `config/sdk.config.json`. The consumer flow is: initialize the config once,
34
+ edit it, then run `sdk` whenever the OpenAPI source changes.
35
+
36
+ If a consumer wants short script aliases in `package.json`, they can add this
37
+ script block to their workspace:
38
+
39
+ ```json
40
+ {
41
+ "scripts": {
42
+ "gen:sdk:init": "ng generate @ojiepermana/angular:sdk-init",
43
+ "gen:sdk": "ng generate @ojiepermana/angular:sdk"
44
+ }
45
+ }
46
+ ```
47
+
48
+ Consumers do not need a `gen:sdk:build` step. That build command only exists
49
+ for developing this repository, where the schematic source under
50
+ `projects/angular/generator/api` must be compiled before local execution.
51
+
31
52
  ## Schematics
32
53
 
33
54
  The entrypoint exposes two schematics, registered in the parent collection at [`projects/angular/collection.json`](../../collection.json):
34
55
 
35
- | Schematic | Script | Purpose |
36
- | ---------- | ---------------------- | --------------------------------------------------------------- |
37
- | `sdk-init` | `bun run gen:sdk:init` | Create `sdk.config.json` at the workspace root from the example |
38
- | `sdk` | `bun run gen:sdk` | Run the generator using `sdk.config.json` |
56
+ | Schematic | Script | Purpose |
57
+ | ---------- | ---------------------- | ------------------------------------------------ |
58
+ | `sdk-init` | `bun run gen:sdk:init` | Create `config/sdk.config.json` from the example |
59
+ | `sdk` | `bun run gen:sdk` | Run the generator using `config/sdk.config.json` |
39
60
 
40
61
  Both can be invoked directly with `ng generate` too:
41
62
 
@@ -50,18 +71,18 @@ ng generate @ojiepermana/angular:sdk [--dry-run] [--config=sdk.config.json]
50
71
 
51
72
  ### `init` options
52
73
 
53
- | Option | Type | Default | Description |
54
- | --------- | ------- | ----------------- | --------------------------------------------- |
55
- | `--path` | string | `sdk.config.json` | Destination path, relative to workspace root. |
56
- | `--force` | boolean | `false` | Overwrite the file if it already exists. |
74
+ | Option | Type | Default | Description |
75
+ | --------- | ------- | ------------------------ | --------------------------------------------- |
76
+ | `--path` | string | `config/sdk.config.json` | Destination path, relative to workspace root. |
77
+ | `--force` | boolean | `false` | Overwrite the file if it already exists. |
57
78
 
58
79
  ### `sdk` options
59
80
 
60
- | Option | Type | Default | Description |
61
- | ----------- | ------ | ----------------- | ------------------------------------------------------------------ |
62
- | `--config` | string | `sdk.config.json` | Path to the config file, relative to workspace root. |
63
- | `--target` | string | _(all)_ | Only generate one target. Accepts a 1-based index or `clientName`. |
64
- | `--dry-run` | flag | — | Preview file operations without writing anything. |
81
+ | Option | Type | Default | Description |
82
+ | ----------- | ------ | ------------------------ | ------------------------------------------------------------------ |
83
+ | `--config` | string | `config/sdk.config.json` | Path to the config file, relative to workspace root. |
84
+ | `--target` | string | _(all)_ | Only generate one target. Accepts a 1-based index or `clientName`. |
85
+ | `--dry-run` | flag | — | Preview file operations without writing anything. |
65
86
 
66
87
  ## Config shape
67
88
 
@@ -197,7 +218,7 @@ All default to `true`. Turn off anything you don't need to shrink the output.
197
218
 
198
219
  ## Pipeline
199
220
 
200
- ```
221
+ ```text
201
222
  sdk.config.json → loader → spec (YAML/JSON) → IR → emitters → writer → Angular CLI Tree
202
223
  ```
203
224
 
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../../fesm2022/ojiepermana-angular-generator-api.mjs",
3
+ "typings": "../../types/ojiepermana-angular-generator-api.d.ts"
4
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/ojiepermana-angular-layout.mjs",
3
+ "typings": "../types/ojiepermana-angular-layout.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/ojiepermana-angular-navigation.mjs",
3
+ "typings": "../types/ojiepermana-angular-navigation.d.ts"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ojiepermana/angular",
3
- "version": "21.0.7",
3
+ "version": "21.0.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ojiepermana/angular.git"
@@ -102,5 +102,8 @@
102
102
  },
103
103
  "module": "fesm2022/ojiepermana-angular.mjs",
104
104
  "typings": "types/ojiepermana-angular.d.ts",
105
- "type": "module"
105
+ "type": "module",
106
+ "files": [
107
+ "**/*"
108
+ ]
106
109
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/ojiepermana-angular-theme.mjs",
3
+ "typings": "../types/ojiepermana-angular-theme.d.ts"
4
+ }