mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-20 07:40:46 +08:00
fix(client): drop TS parameter properties so tests run under Node strip-only
form-transport and publication-form tests now load and pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
05bfd97c6e
commit
fb94c8a6a0
4 changed files with 15 additions and 9 deletions
|
|
@ -200,7 +200,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lib/client.js": {
|
"lib/client.js": {
|
||||||
"output": "bec095ff7f28d3eb97152486275c93badc43fe687377c5d0e3267b355add2e2d",
|
"output": "f733e8c22056a7b47695f04bf468e8e3b812d4e376d5f7e7bc2fa681660bffa8",
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"package.json": "5132d4dd66628c59e1b495b5a75fc6c29a30c220a6c112059b4c3b5983d3cbb9",
|
"package.json": "5132d4dd66628c59e1b495b5a75fc6c29a30c220a6c112059b4c3b5983d3cbb9",
|
||||||
"pnpm-lock.yaml": "f1209ac70e9c2294e0f300c0aad88b64aeecd6aa19dfc929c5766c7d033615a3",
|
"pnpm-lock.yaml": "f1209ac70e9c2294e0f300c0aad88b64aeecd6aa19dfc929c5766c7d033615a3",
|
||||||
|
|
@ -208,8 +208,8 @@
|
||||||
"scripts/build-integrity.mjs": "18e9e32c452ef6217d771675fa8b763464a27ac0cf192d5fbe5cb1682380b0d9",
|
"scripts/build-integrity.mjs": "18e9e32c452ef6217d771675fa8b763464a27ac0cf192d5fbe5cb1682380b0d9",
|
||||||
"src/client/NetxopsCard.tsx": "d4c4e795949496f5f913914c23c338bdbc81ea2b721a55d835815f2eae13f667",
|
"src/client/NetxopsCard.tsx": "d4c4e795949496f5f913914c23c338bdbc81ea2b721a55d835815f2eae13f667",
|
||||||
"src/client/alarm-push-status-view.ts": "9ad84e4a691a6c22de4d85c45047251716929c63cada362205db98428a810a31",
|
"src/client/alarm-push-status-view.ts": "9ad84e4a691a6c22de4d85c45047251716929c63cada362205db98428a810a31",
|
||||||
"src/client/card-form.ts": "00ec10c453fffae8beac4a35a13299514c120c913100a6e4536e7a00d072b8d9",
|
"src/client/card-form.ts": "64d24d9d27f2c948a94f6158288df03ce23335e76dc663236ea8b19187502ffa",
|
||||||
"src/client/controller.ts": "d3353feda6f6b004dd094b1fc90d743003b55ce5a9d0b46c8fb9c1eb33925cc1",
|
"src/client/controller.ts": "666370ea90f5f798f4d8882ad625498230605fd79980bf54ab3cb6aed7bad257",
|
||||||
"src/client/im-delivery-catalog.ts": "faf18d4a8fdcf30033b6d905f156c6fc953d214f8d734417f3bed783994d6117",
|
"src/client/im-delivery-catalog.ts": "faf18d4a8fdcf30033b6d905f156c6fc953d214f8d734417f3bed783994d6117",
|
||||||
"src/client/index.ts": "1f73ae8e8c02e13b47c5679869359444485b4621eca20a15c632289f22e5d760",
|
"src/client/index.ts": "1f73ae8e8c02e13b47c5679869359444485b4621eca20a15c632289f22e5d760",
|
||||||
"src/client/kb-status-view.ts": "458d1dfd9c0f93e6cdd06780c0ad813de54c3aa952fcdb63758a616ab43ffb10",
|
"src/client/kb-status-view.ts": "458d1dfd9c0f93e6cdd06780c0ad813de54c3aa952fcdb63758a616ab43ffb10",
|
||||||
|
|
|
||||||
|
|
@ -2286,7 +2286,6 @@ function booleanFieldPersistFalse(field) {
|
||||||
}
|
}
|
||||||
|
|
||||||
class CardForm {
|
class CardForm {
|
||||||
scope;
|
|
||||||
specs;
|
specs;
|
||||||
secretSpecs;
|
secretSpecs;
|
||||||
staged = new Map;
|
staged = new Map;
|
||||||
|
|
@ -2294,6 +2293,7 @@ class CardForm {
|
||||||
saving = false;
|
saving = false;
|
||||||
failed = false;
|
failed = false;
|
||||||
saveQueue = Promise.resolve();
|
saveQueue = Promise.resolve();
|
||||||
|
scope;
|
||||||
constructor(scope, specs, secrets = []) {
|
constructor(scope, specs, secrets = []) {
|
||||||
this.scope = scope;
|
this.scope = scope;
|
||||||
this.specs = new Map(specs.map((spec) => [spec.field, spec]));
|
this.specs = new Map(specs.map((spec) => [spec.field, spec]));
|
||||||
|
|
@ -2564,8 +2564,6 @@ var API_TOKEN_FIELD = "apiToken";
|
||||||
var STATUS_POLL_MS = 2000;
|
var STATUS_POLL_MS = 2000;
|
||||||
|
|
||||||
class NetxopsCardController {
|
class NetxopsCardController {
|
||||||
scope;
|
|
||||||
ctx;
|
|
||||||
form;
|
form;
|
||||||
store;
|
store;
|
||||||
credential = {
|
credential = {
|
||||||
|
|
@ -2602,6 +2600,8 @@ class NetxopsCardController {
|
||||||
catalogInFlight = false;
|
catalogInFlight = false;
|
||||||
exportStatusInFlight = false;
|
exportStatusInFlight = false;
|
||||||
exportInFlight;
|
exportInFlight;
|
||||||
|
scope;
|
||||||
|
ctx;
|
||||||
constructor(scope, ctx) {
|
constructor(scope, ctx) {
|
||||||
this.scope = scope;
|
this.scope = scope;
|
||||||
this.ctx = ctx;
|
this.ctx = ctx;
|
||||||
|
|
|
||||||
|
|
@ -138,12 +138,14 @@ export class CardForm<T> {
|
||||||
private saving = false
|
private saving = false
|
||||||
private failed = false
|
private failed = false
|
||||||
private saveQueue: Promise<void> = Promise.resolve()
|
private saveQueue: Promise<void> = Promise.resolve()
|
||||||
|
private readonly scope: SettingsFormScope<T>
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly scope: SettingsFormScope<T>,
|
scope: SettingsFormScope<T>,
|
||||||
specs: CardFieldSpec[],
|
specs: CardFieldSpec[],
|
||||||
secrets: CardSecretSpec[] = [],
|
secrets: CardSecretSpec[] = [],
|
||||||
) {
|
) {
|
||||||
|
this.scope = scope
|
||||||
this.specs = new Map(specs.map(spec => [spec.field, spec]))
|
this.specs = new Map(specs.map(spec => [spec.field, spec]))
|
||||||
this.secretSpecs = new Map(secrets.map(spec => [spec.field, spec]))
|
this.secretSpecs = new Map(secrets.map(spec => [spec.field, spec]))
|
||||||
scope.subscribe(() => { this.publish() })
|
scope.subscribe(() => { this.publish() })
|
||||||
|
|
|
||||||
|
|
@ -224,11 +224,15 @@ export class NetxopsCardController {
|
||||||
private catalogInFlight = false
|
private catalogInFlight = false
|
||||||
private exportStatusInFlight = false
|
private exportStatusInFlight = false
|
||||||
private exportInFlight: Promise<void> | undefined
|
private exportInFlight: Promise<void> | undefined
|
||||||
|
private readonly scope: SettingsFormScope<NetxopsSettings>
|
||||||
|
private readonly ctx: ClientContext
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly scope: SettingsFormScope<NetxopsSettings>,
|
scope: SettingsFormScope<NetxopsSettings>,
|
||||||
private readonly ctx: ClientContext,
|
ctx: ClientContext,
|
||||||
) {
|
) {
|
||||||
|
this.scope = scope
|
||||||
|
this.ctx = ctx
|
||||||
this.form = new CardForm(
|
this.form = new CardForm(
|
||||||
scope,
|
scope,
|
||||||
[
|
[
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue