@angular-builders/timestamp
Advanced tools
Comparing version 13.0.0 to 13.0.1-beta.0
@@ -9,14 +9,14 @@ "use strict"; | ||
const fs_1 = require("fs"); | ||
const dateFormat = require("dateformat"); | ||
const dateformat_1 = require("dateformat"); | ||
function createTimestamp({ path, format }, { workspaceRoot, logger }) { | ||
const timestampFileName = `${core_1.getSystemPath(core_1.normalize(workspaceRoot))}/${path}`; | ||
const writeFileObservable = rxjs_1.bindNodeCallback(fs_1.writeFile); | ||
const timestampFileName = `${(0, core_1.getSystemPath)((0, core_1.normalize)(workspaceRoot))}/${path}`; | ||
const writeFileObservable = (0, rxjs_1.bindNodeCallback)(fs_1.writeFile); | ||
const timestampLogger = logger.createChild('Timestamp'); | ||
return writeFileObservable(timestampFileName, dateFormat(new Date(), format)).pipe(operators_1.map(() => ({ success: true })), operators_1.tap(() => timestampLogger.info('Timestamp created')), operators_1.catchError(e => { | ||
return writeFileObservable(timestampFileName, (0, dateformat_1.default)(new Date(), format)).pipe((0, operators_1.map)(() => ({ success: true })), (0, operators_1.tap)(() => timestampLogger.info('Timestamp created')), (0, operators_1.catchError)(e => { | ||
timestampLogger.error('Failed to create timestamp', e); | ||
return rxjs_1.of({ success: false }); | ||
return (0, rxjs_1.of)({ success: false }); | ||
})); | ||
} | ||
exports.createTimestamp = createTimestamp; | ||
exports.default = architect_1.createBuilder(createTimestamp); | ||
exports.default = (0, architect_1.createBuilder)(createTimestamp); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@angular-builders/timestamp", | ||
"version": "13.0.0", | ||
"version": "13.0.1-beta.0", | ||
"repository": { | ||
@@ -25,17 +25,20 @@ "type": "git", | ||
"prebuild": "yarn clean && yarn generate", | ||
"build": "../../node_modules/.bin/tsc", | ||
"build": "tsc", | ||
"postbuild": "yarn copy", | ||
"clean": "../../node_modules/.bin/rimraf dist src/schema.ts", | ||
"copy": "../../node_modules/.bin/cpy src/schema.json dist", | ||
"generate": "../../node_modules/.bin/quicktype -s schema src/schema.json -o src/schema.ts" | ||
"clean": "rimraf dist src/schema.ts", | ||
"copy": "cpy src/schema.json dist", | ||
"generate": "quicktype -s schema src/schema.json -o src/schema.ts" | ||
}, | ||
"devDependencies": { | ||
"@types/dateformat": "^3.0.1" | ||
}, | ||
"dependencies": { | ||
"@angular-devkit/architect": ">=0.1300.0 < 0.1400.0", | ||
"@angular-devkit/core": "^13.0.0", | ||
"dateformat": "^4.3.1" | ||
"dateformat": "^5.0.2" | ||
}, | ||
"gitHead": "472a8c86ed9eb25735eca7f36f304332735f542c" | ||
"devDependencies": { | ||
"@types/dateformat": "^5.0.0", | ||
"jest": "^27.4.7", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.5.4" | ||
}, | ||
"gitHead": "983d847adeac1bfad3bc6825ea183947a273b98e" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17902
4
2
+ Addeddateformat@5.0.3(transitive)
- Removeddateformat@4.6.3(transitive)
Updateddateformat@^5.0.2