-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from expressots/feature/di-binding-3-0-bundle
Feature/di binding 3 0 bundle
- Loading branch information
Showing
39 changed files
with
466 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ expressots.config.ts | |
|
||
*.tgz | ||
|
||
*.container.ts | ||
app.ts | ||
|
||
coverage/ | ||
coverage/ | ||
.early.coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { JestConfigWithTsJest } from "ts-jest"; | ||
|
||
const config: JestConfigWithTsJest = { | ||
testEnvironment: "node", | ||
roots: ["<rootDir>/src", "<rootDir>/test"], | ||
testRegex: ".*\\.spec\\.ts$", | ||
testPathIgnorePatterns: ["/node_modules/", "/bin/"], | ||
collectCoverageFrom: ["src/**/*.ts", "!**/*.spec.ts", "src/**/index.ts"], | ||
moduleNameMapper: { | ||
"^@src/(.*)$": "<rootDir>/src/$1", | ||
}, | ||
setupFiles: ["reflect-metadata"], | ||
transform: { | ||
"^.+\\.ts$": [ | ||
"ts-jest", | ||
{ | ||
tsconfig: "tsconfig.json", | ||
// Add any ts-jest specific options here | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const { execSync } = require("child_process"); | ||
|
||
function makeExecutable(targetFile) { | ||
if (process.platform !== "win32") { // Check if the OS is not Windows | ||
try { | ||
execSync(`chmod +x ${targetFile}`); | ||
console.log(`Made ${targetFile} executable.`); | ||
} catch (error) { | ||
console.error(`Error making ${targetFile} executable:`, error.message); | ||
process.exit(1); | ||
} | ||
} else { | ||
console.log(`Skipping chmod on Windows for ${targetFile}`); | ||
} | ||
} | ||
|
||
if (process.argv.length !== 3) { | ||
console.error("Usage: node chmod.js <file>"); | ||
process.exit(1); | ||
} | ||
|
||
const targetFile = process.argv[2]; | ||
makeExecutable(targetFile); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
|
||
function copyRecursiveSync(src, dest) { | ||
const exists = fs.existsSync(src); | ||
const stats = exists && fs.statSync(src); | ||
const isDirectory = exists && stats.isDirectory(); | ||
|
||
if (isDirectory) { | ||
fs.mkdirSync(dest, { recursive: true }); | ||
fs.readdirSync(src).forEach(function (childItemName) { | ||
copyRecursiveSync( | ||
path.join(src, childItemName), | ||
path.join(dest, childItemName), | ||
); | ||
}); | ||
} else { | ||
fs.copyFileSync(src, dest); | ||
} | ||
} | ||
|
||
if (process.argv.length < 4) { | ||
process.stderr.write( | ||
"Usage: node copy.js <origin1> <origin2> ... <destination>\n", | ||
); | ||
process.exit(1); | ||
} | ||
|
||
const destination = process.argv[process.argv.length - 1]; | ||
|
||
for (let i = 2; i < process.argv.length - 1; i++) { | ||
const origin = process.argv[i]; | ||
copyRecursiveSync(origin, path.join(destination, path.basename(origin))); | ||
process.stdout.write(`Copied: ${origin} to ${destination}\n`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const fs = require("fs").promises; | ||
|
||
const removeTarget = async (target) => { | ||
try { | ||
const targetExists = await fs.stat(target).catch(() => null); | ||
if (!targetExists) { | ||
process.stdout.write(`Directory '${target}' does not exist.\n`); | ||
return; | ||
} | ||
await fs.rm(target, { recursive: true, force: true }); | ||
process.stdout.write(`Removed: ${target}\n`); | ||
} catch (error) { | ||
process.stderr.write(`Error: Unable to remove '${target}'\n`); | ||
process.exit(1); | ||
} | ||
}; | ||
|
||
if (process.argv.length !== 3) { | ||
process.stderr.write("Usage: node rm.js <dir/file>\n"); | ||
process.exit(1); | ||
} | ||
|
||
const target = process.argv[2]; | ||
removeTarget(target); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import { ContainerModule } from "inversify"; | ||
import { CreateModule } from "@expressots/core"; | ||
import { ContainerModule, CreateModule } from "@expressots/core"; | ||
|
||
export const {{moduleName}}{{schematic}}: ContainerModule = CreateModule([]); |
Oops, something went wrong.