@camstack/develop 0.1.1 → 0.1.2
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/scaffold/addon.js +6 -26
- package/dist/scaffold/extend.js +6 -6
- package/package.json +1 -1
package/dist/scaffold/addon.js
CHANGED
|
@@ -198,13 +198,13 @@ const ADDON_TS = `/**
|
|
|
198
198
|
*/
|
|
199
199
|
import { BaseAddon, type ProviderRegistration } from '@camstack/types'
|
|
200
200
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
// Operator-visible config fields go here, each with a default below and a
|
|
202
|
+
// field in a \`globalSettingsSchema()\` override. No on/off switch: the
|
|
203
|
+
// capability toggle is an addon's ONE enable (D777). An addon that needs a
|
|
204
|
+
// setting to do anything (a URL, a token) treats the empty value as inert.
|
|
205
|
+
type <%= className %>Config = Readonly<Record<string, never>>
|
|
204
206
|
|
|
205
|
-
const DEFAULTS: <%= className %>Config = {
|
|
206
|
-
enabled: true,
|
|
207
|
-
}
|
|
207
|
+
const DEFAULTS: <%= className %>Config = {}
|
|
208
208
|
|
|
209
209
|
export class <%= className %>Addon extends BaseAddon<<%= className %>Config> {
|
|
210
210
|
constructor() {
|
|
@@ -215,26 +215,6 @@ export class <%= className %>Addon extends BaseAddon<<%= className %>Config> {
|
|
|
215
215
|
this.ctx.logger.info('<%= displayName %> addon initialized')
|
|
216
216
|
return []
|
|
217
217
|
}
|
|
218
|
-
|
|
219
|
-
protected globalSettingsSchema() {
|
|
220
|
-
return this.schema({
|
|
221
|
-
sections: [
|
|
222
|
-
{
|
|
223
|
-
id: '<%= fileName %>',
|
|
224
|
-
title: '<%= displayName %> Settings',
|
|
225
|
-
columns: 1,
|
|
226
|
-
fields: [
|
|
227
|
-
{
|
|
228
|
-
type: 'boolean',
|
|
229
|
-
key: 'enabled',
|
|
230
|
-
label: 'Enabled',
|
|
231
|
-
description: 'Master switch for the addon.',
|
|
232
|
-
},
|
|
233
|
-
],
|
|
234
|
-
},
|
|
235
|
-
],
|
|
236
|
-
})
|
|
237
|
-
}
|
|
238
218
|
}
|
|
239
219
|
|
|
240
220
|
export default <%= className %>Addon
|
package/dist/scaffold/extend.js
CHANGED
|
@@ -140,13 +140,13 @@ const ADDON_TS = `/**
|
|
|
140
140
|
*/
|
|
141
141
|
import { BaseAddon, type ProviderRegistration } from '@camstack/types'
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
// Operator-visible config fields go here, each with a default below and a
|
|
144
|
+
// field in a \`globalSettingsSchema()\` override. No on/off switch: the
|
|
145
|
+
// capability toggle is an addon's ONE enable (D777). An addon that needs a
|
|
146
|
+
// setting to do anything (a URL, a token) treats the empty value as inert.
|
|
147
|
+
type <%= className %>Config = Readonly<Record<string, never>>
|
|
146
148
|
|
|
147
|
-
const DEFAULTS: <%= className %>Config = {
|
|
148
|
-
enabled: true,
|
|
149
|
-
}
|
|
149
|
+
const DEFAULTS: <%= className %>Config = {}
|
|
150
150
|
|
|
151
151
|
export class <%= className %>Addon extends BaseAddon<<%= className %>Config> {
|
|
152
152
|
constructor() {
|
package/package.json
CHANGED