Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
blobStorageContainer: configuration.outputBlobStorageContainer,
blobStorageConnectionString: configuration.outputBlobStorageConnectionString,
environment: "publishing"
});
const outputSettingsProvider = new StaticSettingsProvider({
blobStorageContainer: configuration.outputBlobStorageContainer,
blobStorageConnectionString: configuration.outputBlobStorageConnectionString
});
/* Storage where the website get published */
const outputBlobStorage = new AzureBlobStorage(outputSettingsProvider);
const injector = new InversifyInjector();
injector.bindModule(new CoreModule());
injector.bindModule(new CorePublishModule());
injector.bindModule(new StyleModule());
injector.bindModule(new ProseMirrorModule());
injector.bindModule(new ApimPublishModule());
injector.bindInstance("settingsProvider", settingsProvider);
injector.bindInstance("outputBlobStorage", outputBlobStorage);
injector.resolve("autostart");
const publisher = injector.resolve("sitePublisher");
await publisher.publish();
}
import { StaticSettingsProvider } from "./components/staticSettingsProvider";
import { FileSystemBlobStorage } from "./components/filesystemBlobStorage";
import { ApimPublishModule } from "./apim.publish.module";
/* Reading settings from configuration file */
const configFile = path.resolve(__dirname, "./config.json");
const configuration = JSON.parse(fs.readFileSync(configFile, "utf8").toString());
const settingsProvider = new StaticSettingsProvider(configuration);
/* Storage where the website get published */
const outputBlobStorage = new FileSystemBlobStorage("./dist/website");
/* Initializing dependency injection container */
const injector = new InversifyInjector();
injector.bindModule(new CoreModule());
injector.bindModule(new CorePublishModule());
injector.bindModule(new StyleModule());
injector.bindModule(new ProseMirrorModule());
injector.bindModule(new ApimPublishModule());
injector.bindInstance("settingsProvider", settingsProvider);
injector.bindInstance("outputBlobStorage", outputBlobStorage);
injector.resolve("autostart");
/* Allowing self-signed certificates for HTTP requests */
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
/* Bulding dependency injection container */
const publisher = injector.resolve("sitePublisher");
/* Running actual publishing */
publisher.publish()
.then(() => {