README
rebuild-operation (OperationClassification node-cjs)
Operation that makes it possible to rebuild an operation (re-index, re-build, etc.)
This function rebuilds an operation and re-indexes (part of) its files.
Input | ||
---|---|---|
config | { updatedAt?: number, typerepoManualProjectRoot?: string, operationManualProjectRoot?: string, operationBasePath: string, filePaths?: string[], noUnresolvedRebuilding?: boolean, force?: boolean, debug?: boolean, noExit?: boolean, stack?: string[], } | |
Output |
This function rebuilds an operation and re-indexes (part of) its files.
Builds and minifies the src
Input | ||
---|---|---|
operationBasePath | string | |
Output |
Builds and minifies the src
Clears all typescript indexation models, and removes all indexation from the oprations
TODO: test first, not sure about the Operation one
Input | ||
---|---|---|
operationName (optional) | string | |
Output |
Input | ||
---|---|---|
manualProjectRoot (optional) | string | |
Output |
Clears all typescript indexation models, and removes all indexation from the oprations
TODO: test first, not sure about the Operation one
Show CLI information (8)
rebuildOperation CLI syntax:
rebuildOperation [...operations]
Operations can be a list of differnt operation names you want to rebuild. It's also possible to specify a relative path instead of an operation name.
for example:
rebuildOperation ./packages/operation-x
would rebuild operation-x
in your packages folder
another handy one is rebuildOperation .
because it will rebuild the operation in your current folder.
Input | ||
---|---|---|
- | ||
Output |
rebuildOperation CLI syntax:
rebuildOperation [...operations]
Operations can be a list of differnt operation names you want to rebuild. It's also possible to specify a relative path instead of an operation name.
for example:
rebuildOperation ./packages/operation-x
would rebuild operation-x
in your packages folder
another handy one is rebuildOperation .
because it will rebuild the operation in your current folder.
Show test information(2)
Input | ||
---|---|---|
- | ||
Output |
Show internal (20)
Executes a command without showing the result, unless the command fails, then it will log the output.,
Input | ||
---|---|---|
config | { command: string, cwd?: string, description?: string, } | |
Output | { } |
exits the process if our own dependencies change
Input | ||
---|---|---|
operationName | string | |
Output |
generates schemas for db models
Is done every time you run rebuildOperation and generateSdkOperations
TODO: there are some problems with references that cannot be found with references to generic types... This can probably be solved, but it's not going to be easy!
IDEA:
- find all referencing definitions in the main schema
- find those in all other interfaces
- recursively find references in those as well
- if you can't find the reference, remove the reference and replace type to "any" (add WARNING to description "reference not found")
This will result in a valid schema that has no unresolved references
TODO: apply Storage
TODO: apply Array
TODO: apply special config conventions (MergedDbConfig) like tsconfig.json and package.json
TODO: Make a validator that validates the whole database to this schema.
Input | ||
---|---|---|
manualProjectRoot (optional) | string | |
Output |
gets all identifiers of files, which are the relative path to a file without the extension
Input | ||
---|---|---|
{ | ||
operationFolderPath, | ||
pathSuffix, | ||
extension, | ||
} | { operationFolderPath: string, extension?: { }, pathSuffix: string, } | |
Output |
gets identifiers of ts and tsx files, which are the relative path to a file without the extension
Input | ||
---|---|---|
operationFolderPath | string | |
Output |
gets identifiers of ts and tsx files, which are the relative path to a file without the extension
in order for them to be unique, we assume here that there's never a file with the ts extension when there's also a tsx file in the same folder with the same name. This would create duplicate ids.
Input | ||
---|---|---|
operationFolderPath | string | |
Output |
returns a boolean indicating whether or not the operation should be able to be built, based on the OperationClassification
Input | ||
---|---|---|
operationBasePath | string | |
Output |
Input | ||
---|---|---|
operationBasePath | string | |
Output | { } |
Rebuilds all operations that are needed to be rebuilt
Input | ||
---|---|---|
isRebuildingProcessUpdated (optional) | boolean | If true, you are indicating that the rebuilding process has changed and all operations should be rebuilt after this date. |
Output |
if you don't force it, there's an operation index, there's an index folder, the src has not been touched since hte last indexation, and there's a buildfolder (if needed), then the rebuildOperation can be skipped
Input | ||
---|---|---|
config | { operationBasePath: string, debug?: boolean, force?: boolean, operationManualProjectRoot?: string, rebuildUpdatedAt?: number, } | |
Output |
Executes a command without showing the result, unless the command fails, then it will log the output.,
exits the process if our own dependencies change
generates schemas for db models
Is done every time you run rebuildOperation and generateSdkOperations
TODO: there are some problems with references that cannot be found with references to generic types... This can probably be solved, but it's not going to be easy!
IDEA:
- find all referencing definitions in the main schema
- find those in all other interfaces
- recursively find references in those as well
- if you can't find the reference, remove the reference and replace type to "any" (add WARNING to description "reference not found")
This will result in a valid schema that has no unresolved references
TODO: apply Storage
TODO: apply Array
TODO: apply special config conventions (MergedDbConfig) like tsconfig.json and package.json
TODO: Make a validator that validates the whole database to this schema.
gets all identifiers of files, which are the relative path to a file without the extension
gets identifiers of ts and tsx files, which are the relative path to a file without the extension
gets identifiers of ts and tsx files, which are the relative path to a file without the extension
in order for them to be unique, we assume here that there's never a file with the ts extension when there's also a tsx file in the same folder with the same name. This would create duplicate ids.
returns a boolean indicating whether or not the operation should be able to be built, based on the OperationClassification
Rebuilds all operations that are needed to be rebuilt
if you don't force it, there's an operation index, there's an index folder, the src has not been touched since hte last indexation, and there's a buildfolder (if needed), then the rebuildOperation can be skipped
README
rebuild-operation (OperationClassification node-cjs)
Operation that makes it possible to rebuild an operation (re-index, re-build, etc.)
This function rebuilds an operation and re-indexes (part of) its files.
Input | ||
---|---|---|
config | { updatedAt?: number, typerepoManualProjectRoot?: string, operationManualProjectRoot?: string, operationBasePath: string, filePaths?: string[], noUnresolvedRebuilding?: boolean, force?: boolean, debug?: boolean, noExit?: boolean, stack?: string[], } | |
Output |
This function rebuilds an operation and re-indexes (part of) its files.
Builds and minifies the src
Input | ||
---|---|---|
operationBasePath | string | |
Output |
Builds and minifies the src
Clears all typescript indexation models, and removes all indexation from the oprations
TODO: test first, not sure about the Operation one
Input | ||
---|---|---|
operationName (optional) | string | |
Output |
Input | ||
---|---|---|
manualProjectRoot (optional) | string | |
Output |
Clears all typescript indexation models, and removes all indexation from the oprations
TODO: test first, not sure about the Operation one
Show CLI information (8)
rebuildOperation CLI syntax:
rebuildOperation [...operations]
Operations can be a list of differnt operation names you want to rebuild. It's also possible to specify a relative path instead of an operation name.
for example:
rebuildOperation ./packages/operation-x
would rebuild operation-x
in your packages folder
another handy one is rebuildOperation .
because it will rebuild the operation in your current folder.
Input | ||
---|---|---|
- | ||
Output |
rebuildOperation CLI syntax:
rebuildOperation [...operations]
Operations can be a list of differnt operation names you want to rebuild. It's also possible to specify a relative path instead of an operation name.
for example:
rebuildOperation ./packages/operation-x
would rebuild operation-x
in your packages folder
another handy one is rebuildOperation .
because it will rebuild the operation in your current folder.
Show test information(2)
Input | ||
---|---|---|
- | ||
Output |
Show internal (20)
Executes a command without showing the result, unless the command fails, then it will log the output.,
Input | ||
---|---|---|
config | { command: string, cwd?: string, description?: string, } | |
Output | { } |
exits the process if our own dependencies change
Input | ||
---|---|---|
operationName | string | |
Output |
generates schemas for db models
Is done every time you run rebuildOperation and generateSdkOperations
TODO: there are some problems with references that cannot be found with references to generic types... This can probably be solved, but it's not going to be easy!
IDEA:
- find all referencing definitions in the main schema
- find those in all other interfaces
- recursively find references in those as well
- if you can't find the reference, remove the reference and replace type to "any" (add WARNING to description "reference not found")
This will result in a valid schema that has no unresolved references
TODO: apply Storage
TODO: apply Array
TODO: apply special config conventions (MergedDbConfig) like tsconfig.json and package.json
TODO: Make a validator that validates the whole database to this schema.
Input | ||
---|---|---|
manualProjectRoot (optional) | string | |
Output |
gets all identifiers of files, which are the relative path to a file without the extension
Input | ||
---|---|---|
{ | ||
operationFolderPath, | ||
pathSuffix, | ||
extension, | ||
} | { operationFolderPath: string, extension?: { }, pathSuffix: string, } | |
Output |
gets identifiers of ts and tsx files, which are the relative path to a file without the extension
Input | ||
---|---|---|
operationFolderPath | string | |
Output |
gets identifiers of ts and tsx files, which are the relative path to a file without the extension
in order for them to be unique, we assume here that there's never a file with the ts extension when there's also a tsx file in the same folder with the same name. This would create duplicate ids.
Input | ||
---|---|---|
operationFolderPath | string | |
Output |
returns a boolean indicating whether or not the operation should be able to be built, based on the OperationClassification
Input | ||
---|---|---|
operationBasePath | string | |
Output |
Input | ||
---|---|---|
operationBasePath | string | |
Output | { } |
Rebuilds all operations that are needed to be rebuilt
Input | ||
---|---|---|
isRebuildingProcessUpdated (optional) | boolean | If true, you are indicating that the rebuilding process has changed and all operations should be rebuilt after this date. |
Output |
if you don't force it, there's an operation index, there's an index folder, the src has not been touched since hte last indexation, and there's a buildfolder (if needed), then the rebuildOperation can be skipped
Input | ||
---|---|---|
config | { operationBasePath: string, debug?: boolean, force?: boolean, operationManualProjectRoot?: string, rebuildUpdatedAt?: number, } | |
Output |
Executes a command without showing the result, unless the command fails, then it will log the output.,
exits the process if our own dependencies change
generates schemas for db models
Is done every time you run rebuildOperation and generateSdkOperations
TODO: there are some problems with references that cannot be found with references to generic types... This can probably be solved, but it's not going to be easy!
IDEA:
- find all referencing definitions in the main schema
- find those in all other interfaces
- recursively find references in those as well
- if you can't find the reference, remove the reference and replace type to "any" (add WARNING to description "reference not found")
This will result in a valid schema that has no unresolved references
TODO: apply Storage
TODO: apply Array
TODO: apply special config conventions (MergedDbConfig) like tsconfig.json and package.json
TODO: Make a validator that validates the whole database to this schema.
gets all identifiers of files, which are the relative path to a file without the extension
gets identifiers of ts and tsx files, which are the relative path to a file without the extension
gets identifiers of ts and tsx files, which are the relative path to a file without the extension
in order for them to be unique, we assume here that there's never a file with the ts extension when there's also a tsx file in the same folder with the same name. This would create duplicate ids.
returns a boolean indicating whether or not the operation should be able to be built, based on the OperationClassification
Rebuilds all operations that are needed to be rebuilt
if you don't force it, there's an operation index, there's an index folder, the src has not been touched since hte last indexation, and there's a buildfolder (if needed), then the rebuildOperation can be skipped