node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
import type { Step } from '.';
declare const _default: readonly Step[];
export default _default;
//# sourceMappingURL=default.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../src/strapi/remote/flows/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;;AAE9B,wBAqCqB"}

View File

@@ -0,0 +1,43 @@
'use strict';
var DEFAULT_TRANSFER_FLOW = [
{
kind: 'action',
action: 'bootstrap'
},
{
kind: 'action',
action: 'init'
},
{
kind: 'action',
action: 'beforeTransfer'
},
{
kind: 'transfer',
stage: 'schemas'
},
{
kind: 'transfer',
stage: 'entities'
},
{
kind: 'transfer',
stage: 'assets'
},
{
kind: 'transfer',
stage: 'links'
},
{
kind: 'transfer',
stage: 'configuration'
},
{
kind: 'action',
action: 'close'
}
];
module.exports = DEFAULT_TRANSFER_FLOW;
//# sourceMappingURL=default.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"default.js","sources":["../../../../src/strapi/remote/flows/default.ts"],"sourcesContent":["import type { Step } from '.';\n\nexport default [\n {\n kind: 'action',\n action: 'bootstrap',\n },\n {\n kind: 'action',\n action: 'init',\n },\n {\n kind: 'action',\n action: 'beforeTransfer',\n },\n {\n kind: 'transfer',\n stage: 'schemas',\n },\n {\n kind: 'transfer',\n stage: 'entities',\n },\n {\n kind: 'transfer',\n stage: 'assets',\n },\n {\n kind: 'transfer',\n stage: 'links',\n },\n {\n kind: 'transfer',\n stage: 'configuration',\n },\n {\n kind: 'action',\n action: 'close',\n },\n] as readonly Step[];\n"],"names":["kind","action","stage"],"mappings":";;AAEA,4BAAe;AACb,IAAA;QACEA,IAAM,EAAA,QAAA;QACNC,MAAQ,EAAA;AACV,KAAA;AACA,IAAA;QACED,IAAM,EAAA,QAAA;QACNC,MAAQ,EAAA;AACV,KAAA;AACA,IAAA;QACED,IAAM,EAAA,QAAA;QACNC,MAAQ,EAAA;AACV,KAAA;AACA,IAAA;QACED,IAAM,EAAA,UAAA;QACNE,KAAO,EAAA;AACT,KAAA;AACA,IAAA;QACEF,IAAM,EAAA,UAAA;QACNE,KAAO,EAAA;AACT,KAAA;AACA,IAAA;QACEF,IAAM,EAAA,UAAA;QACNE,KAAO,EAAA;AACT,KAAA;AACA,IAAA;QACEF,IAAM,EAAA,UAAA;QACNE,KAAO,EAAA;AACT,KAAA;AACA,IAAA;QACEF,IAAM,EAAA,UAAA;QACNE,KAAO,EAAA;AACT,KAAA;AACA,IAAA;QACEF,IAAM,EAAA,QAAA;QACNC,MAAQ,EAAA;AACV;CACD;;;;"}

View File

@@ -0,0 +1,41 @@
var DEFAULT_TRANSFER_FLOW = [
{
kind: 'action',
action: 'bootstrap'
},
{
kind: 'action',
action: 'init'
},
{
kind: 'action',
action: 'beforeTransfer'
},
{
kind: 'transfer',
stage: 'schemas'
},
{
kind: 'transfer',
stage: 'entities'
},
{
kind: 'transfer',
stage: 'assets'
},
{
kind: 'transfer',
stage: 'links'
},
{
kind: 'transfer',
stage: 'configuration'
},
{
kind: 'action',
action: 'close'
}
];
export { DEFAULT_TRANSFER_FLOW as default };
//# sourceMappingURL=default.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"default.mjs","sources":["../../../../src/strapi/remote/flows/default.ts"],"sourcesContent":["import type { Step } from '.';\n\nexport default [\n {\n kind: 'action',\n action: 'bootstrap',\n },\n {\n kind: 'action',\n action: 'init',\n },\n {\n kind: 'action',\n action: 'beforeTransfer',\n },\n {\n kind: 'transfer',\n stage: 'schemas',\n },\n {\n kind: 'transfer',\n stage: 'entities',\n },\n {\n kind: 'transfer',\n stage: 'assets',\n },\n {\n kind: 'transfer',\n stage: 'links',\n },\n {\n kind: 'transfer',\n stage: 'configuration',\n },\n {\n kind: 'action',\n action: 'close',\n },\n] as readonly Step[];\n"],"names":["kind","action","stage"],"mappings":"AAEA,4BAAe;AACb,IAAA;QACEA,IAAM,EAAA,QAAA;QACNC,MAAQ,EAAA;AACV,KAAA;AACA,IAAA;QACED,IAAM,EAAA,QAAA;QACNC,MAAQ,EAAA;AACV,KAAA;AACA,IAAA;QACED,IAAM,EAAA,QAAA;QACNC,MAAQ,EAAA;AACV,KAAA;AACA,IAAA;QACED,IAAM,EAAA,UAAA;QACNE,KAAO,EAAA;AACT,KAAA;AACA,IAAA;QACEF,IAAM,EAAA,UAAA;QACNE,KAAO,EAAA;AACT,KAAA;AACA,IAAA;QACEF,IAAM,EAAA,UAAA;QACNE,KAAO,EAAA;AACT,KAAA;AACA,IAAA;QACEF,IAAM,EAAA,UAAA;QACNE,KAAO,EAAA;AACT,KAAA;AACA,IAAA;QACEF,IAAM,EAAA,UAAA;QACNE,KAAO,EAAA;AACT,KAAA;AACA,IAAA;QACEF,IAAM,EAAA,QAAA;QACNC,MAAQ,EAAA;AACV;CACD;;;;"}

View File

@@ -0,0 +1,19 @@
import type { TransferStage } from '../../../../types';
export type Step = {
kind: 'action';
action: string;
} | {
kind: 'transfer';
stage: TransferStage;
locked?: boolean;
};
export { default as DEFAULT_TRANSFER_FLOW } from './default';
export interface TransferFlow {
has(step: Step): boolean;
can(step: Step): boolean;
cannot(step: Step): boolean;
set(step: Step): this;
get(): Step | null;
}
export declare const createFlow: (flow: readonly Step[]) => TransferFlow;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/strapi/remote/flows/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,MAAM,IAAI,GACZ;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,aAAa,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAM7D,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;IACzB,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;IAC5B,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,GAAG,IAAI,IAAI,GAAG,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,SAAU,SAAS,IAAI,EAAE,KAAG,YA+DlD,CAAC"}

View File

@@ -0,0 +1,54 @@
'use strict';
const createFlow = (flow)=>{
const state = {
step: null
};
/**
* Equality check between two steps
*/ const stepEqual = (stepA, stepB)=>{
if (stepA.kind === 'action' && stepB.kind === 'action') {
return stepA.action === stepB.action;
}
if (stepA.kind === 'transfer' && stepB.kind === 'transfer') {
return stepA.stage === stepB.stage;
}
return false;
};
/**
* Find the index for a given step
*/ const findStepIndex = (step)=>flow.findIndex((flowStep)=>stepEqual(step, flowStep));
return {
has (step) {
return findStepIndex(step) !== -1;
},
can (step) {
if (state.step === null) {
return true;
}
const indexesDifference = findStepIndex(step) - findStepIndex(state.step);
// It's possible to send multiple time the same transfer step in a row
if (indexesDifference === 0 && step.kind === 'transfer') {
return true;
}
return indexesDifference > 0;
},
cannot (step) {
return !this.can(step);
},
set (step) {
const canSwitch = this.can(step);
if (!canSwitch) {
throw new Error('Impossible to proceed to the given step');
}
state.step = step;
return this;
},
get () {
return state.step;
}
};
};
exports.createFlow = createFlow;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../../../src/strapi/remote/flows/index.ts"],"sourcesContent":["import type { TransferStage } from '../../../../types';\n\nexport type Step =\n | { kind: 'action'; action: string }\n | { kind: 'transfer'; stage: TransferStage; locked?: boolean };\n\nexport { default as DEFAULT_TRANSFER_FLOW } from './default';\n\ninterface IState {\n step: Step | null;\n}\n\nexport interface TransferFlow {\n has(step: Step): boolean;\n can(step: Step): boolean;\n cannot(step: Step): boolean;\n set(step: Step): this;\n get(): Step | null;\n}\n\nexport const createFlow = (flow: readonly Step[]): TransferFlow => {\n const state: IState = { step: null };\n\n /**\n * Equality check between two steps\n */\n const stepEqual = (stepA: Step, stepB: Step): boolean => {\n if (stepA.kind === 'action' && stepB.kind === 'action') {\n return stepA.action === stepB.action;\n }\n\n if (stepA.kind === 'transfer' && stepB.kind === 'transfer') {\n return stepA.stage === stepB.stage;\n }\n\n return false;\n };\n\n /**\n * Find the index for a given step\n */\n const findStepIndex = (step: Step) => flow.findIndex((flowStep) => stepEqual(step, flowStep));\n\n return {\n has(step: Step) {\n return findStepIndex(step) !== -1;\n },\n\n can(step: Step) {\n if (state.step === null) {\n return true;\n }\n\n const indexesDifference = findStepIndex(step) - findStepIndex(state.step);\n\n // It's possible to send multiple time the same transfer step in a row\n if (indexesDifference === 0 && step.kind === 'transfer') {\n return true;\n }\n\n return indexesDifference > 0;\n },\n\n cannot(step: Step) {\n return !this.can(step);\n },\n\n set(step: Step) {\n const canSwitch = this.can(step);\n\n if (!canSwitch) {\n throw new Error('Impossible to proceed to the given step');\n }\n\n state.step = step;\n\n return this;\n },\n\n get() {\n return state.step;\n },\n };\n};\n"],"names":["createFlow","flow","state","step","stepEqual","stepA","stepB","kind","action","stage","findStepIndex","findIndex","flowStep","has","can","indexesDifference","cannot","set","canSwitch","Error","get"],"mappings":";;AAoBO,MAAMA,aAAa,CAACC,IAAAA,GAAAA;AACzB,IAAA,MAAMC,KAAgB,GAAA;QAAEC,IAAM,EAAA;AAAK,KAAA;AAEnC;;MAGA,MAAMC,SAAY,GAAA,CAACC,KAAaC,EAAAA,KAAAA,GAAAA;AAC9B,QAAA,IAAID,MAAME,IAAI,KAAK,YAAYD,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,EAAA;AACd,gBAAA,MAAM,IAAIC,KAAM,CAAA,yCAAA,CAAA;AAClB;AAEAjB,YAAAA,KAAAA,CAAMC,IAAI,GAAGA,IAAAA;AAEb,YAAA,OAAO,IAAI;AACb,SAAA;AAEAiB,QAAAA,GAAAA,CAAAA,GAAAA;AACE,YAAA,OAAOlB,MAAMC,IAAI;AACnB;AACF,KAAA;AACF;;;;"}

View File

@@ -0,0 +1,52 @@
const createFlow = (flow)=>{
const state = {
step: null
};
/**
* Equality check between two steps
*/ const stepEqual = (stepA, stepB)=>{
if (stepA.kind === 'action' && stepB.kind === 'action') {
return stepA.action === stepB.action;
}
if (stepA.kind === 'transfer' && stepB.kind === 'transfer') {
return stepA.stage === stepB.stage;
}
return false;
};
/**
* Find the index for a given step
*/ const findStepIndex = (step)=>flow.findIndex((flowStep)=>stepEqual(step, flowStep));
return {
has (step) {
return findStepIndex(step) !== -1;
},
can (step) {
if (state.step === null) {
return true;
}
const indexesDifference = findStepIndex(step) - findStepIndex(state.step);
// It's possible to send multiple time the same transfer step in a row
if (indexesDifference === 0 && step.kind === 'transfer') {
return true;
}
return indexesDifference > 0;
},
cannot (step) {
return !this.can(step);
},
set (step) {
const canSwitch = this.can(step);
if (!canSwitch) {
throw new Error('Impossible to proceed to the given step');
}
state.step = step;
return this;
},
get () {
return state.step;
}
};
};
export { createFlow };
//# sourceMappingURL=index.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":["../../../../src/strapi/remote/flows/index.ts"],"sourcesContent":["import type { TransferStage } from '../../../../types';\n\nexport type Step =\n | { kind: 'action'; action: string }\n | { kind: 'transfer'; stage: TransferStage; locked?: boolean };\n\nexport { default as DEFAULT_TRANSFER_FLOW } from './default';\n\ninterface IState {\n step: Step | null;\n}\n\nexport interface TransferFlow {\n has(step: Step): boolean;\n can(step: Step): boolean;\n cannot(step: Step): boolean;\n set(step: Step): this;\n get(): Step | null;\n}\n\nexport const createFlow = (flow: readonly Step[]): TransferFlow => {\n const state: IState = { step: null };\n\n /**\n * Equality check between two steps\n */\n const stepEqual = (stepA: Step, stepB: Step): boolean => {\n if (stepA.kind === 'action' && stepB.kind === 'action') {\n return stepA.action === stepB.action;\n }\n\n if (stepA.kind === 'transfer' && stepB.kind === 'transfer') {\n return stepA.stage === stepB.stage;\n }\n\n return false;\n };\n\n /**\n * Find the index for a given step\n */\n const findStepIndex = (step: Step) => flow.findIndex((flowStep) => stepEqual(step, flowStep));\n\n return {\n has(step: Step) {\n return findStepIndex(step) !== -1;\n },\n\n can(step: Step) {\n if (state.step === null) {\n return true;\n }\n\n const indexesDifference = findStepIndex(step) - findStepIndex(state.step);\n\n // It's possible to send multiple time the same transfer step in a row\n if (indexesDifference === 0 && step.kind === 'transfer') {\n return true;\n }\n\n return indexesDifference > 0;\n },\n\n cannot(step: Step) {\n return !this.can(step);\n },\n\n set(step: Step) {\n const canSwitch = this.can(step);\n\n if (!canSwitch) {\n throw new Error('Impossible to proceed to the given step');\n }\n\n state.step = step;\n\n return this;\n },\n\n get() {\n return state.step;\n },\n };\n};\n"],"names":["createFlow","flow","state","step","stepEqual","stepA","stepB","kind","action","stage","findStepIndex","findIndex","flowStep","has","can","indexesDifference","cannot","set","canSwitch","Error","get"],"mappings":"AAoBO,MAAMA,aAAa,CAACC,IAAAA,GAAAA;AACzB,IAAA,MAAMC,KAAgB,GAAA;QAAEC,IAAM,EAAA;AAAK,KAAA;AAEnC;;MAGA,MAAMC,SAAY,GAAA,CAACC,KAAaC,EAAAA,KAAAA,GAAAA;AAC9B,QAAA,IAAID,MAAME,IAAI,KAAK,YAAYD,KAAMC,CAAAA,IAAI,KAAK,QAAU,EAAA;AACtD,YAAA,OAAOF,KAAMG,CAAAA,MAAM,KAAKF,KAAAA,CAAME,MAAM;AACtC;AAEA,QAAA,IAAIH,MAAME,IAAI,KAAK,cAAcD,KAAMC,CAAAA,IAAI,KAAK,UAAY,EAAA;AAC1D,YAAA,OAAOF,KAAMI,CAAAA,KAAK,KAAKH,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